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.
Afficher le fichier Open project: nuxeo/nuxeo-dotnet-client Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
ProcessFile ( string path ) : Task
UploadBlob ( UploadJob job ) : Task

Method Details

AddFile() public méthode

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

AddFiles() public méthode

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.
Résultat Uploader

Operation() public méthode

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.
Résultat Operation

SetChunkSize() public méthode

Sets the chunk size.
public SetChunkSize ( int size ) : Uploader
size int Chunk size in bytes.
Résultat Uploader

SetChunked() public méthode

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.
Résultat Uploader

SetNumConcurrentUploads() public méthode

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

UploadFiles() public méthode

Uploads all files in the upload queue.
public UploadFiles ( ) : Task
Résultat Task

Uploader() public méthode

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