C# Class NuxeoClient.Uploader

Provides a cass for uploading files to a Nuxeo server. Files can be uploaded as a whole or in several chunks.
No server-side error handling was implemented. If an upload job fails, a FailedToUploadException is thrown.
Datei anzeigen Open project: nuxeo/nuxeo-dotnet-client Class Usage Examples

Public Methods

Method Description
AddFile ( string file ) : Uploader

Adds a file to the upload queue.

AddFiles ( string files ) : Uploader

Adds several files to the upload queue.

Operation ( string operationId ) : Operation

Creates a new instance of Operation to be executed on all uploaded files in the current batch.

SetChunkSize ( int size ) : Uploader

Sets the chunk size.

SetChunked ( bool isChunkedUpload ) : Uploader

Sets whether files should be uploaded in chunks or not.

SetNumConcurrentUploads ( int num ) : Uploader

Sets the number of maximum concurent uploads.

UploadFiles ( ) : Task

Uploads all files in the upload queue.

Uploader ( Client client ) : NuxeoClient.Wrappers

Initializes a new instance of Uploader.

Private Methods

Method Description
ProcessFile ( string path ) : Task
UploadBlob ( UploadJob job ) : Task

Method Details

AddFile() public method

Adds a file to the upload queue.
public AddFile ( string file ) : Uploader
file string The path to the file to be uploaded.
return Uploader

AddFiles() public method

Adds several files to the upload queue.
public AddFiles ( string files ) : Uploader
files string An array containing the paths to the files to be uploaded.
return Uploader

Operation() public method

Creates a new instance of Operation to be executed on all uploaded files in the current batch.
public Operation ( string operationId ) : Operation
operationId string The operation id.
return Operation

SetChunkSize() public method

Sets the chunk size.
public SetChunkSize ( int size ) : Uploader
size int Chunk size in bytes.
return Uploader

SetChunked() public method

Sets whether files should be uploaded in chunks or not.
public SetChunked ( bool isChunkedUpload ) : Uploader
isChunkedUpload bool A boolean that should be true if the upload is to be in chunks, or false otherwise.
return Uploader

SetNumConcurrentUploads() public method

Sets the number of maximum concurent uploads.
public SetNumConcurrentUploads ( int num ) : Uploader
num int The number of concurrent uploads.
return Uploader

UploadFiles() public method

Uploads all files in the upload queue.
public UploadFiles ( ) : Task
return Task

Uploader() public method

Initializes a new instance of Uploader.
public Uploader ( Client client ) : NuxeoClient.Wrappers
client Client The Nuxeo throw which the upload requests will be made.
return NuxeoClient.Wrappers