C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ProcessFile ( string path ) : Task
UploadBlob ( UploadJob job ) : Task

Описание методов

AddFile() публичный Метод

Adds a file to the upload queue.
public AddFile ( string file ) : Uploader
file string The path to the file to be uploaded.
Результат Uploader

AddFiles() публичный Метод

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.
Результат Uploader

Operation() публичный Метод

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.
Результат Operation

SetChunkSize() публичный Метод

Sets the chunk size.
public SetChunkSize ( int size ) : Uploader
size int Chunk size in bytes.
Результат Uploader

SetChunked() публичный Метод

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.
Результат Uploader

SetNumConcurrentUploads() публичный Метод

Sets the number of maximum concurent uploads.
public SetNumConcurrentUploads ( int num ) : Uploader
num int The number of concurrent uploads.
Результат Uploader

UploadFiles() публичный Метод

Uploads all files in the upload queue.
public UploadFiles ( ) : Task
Результат Task

Uploader() публичный Метод

Initializes a new instance of Uploader.
public Uploader ( Client client ) : NuxeoClient.Wrappers
client Client The Nuxeo throw which the upload requests will be made.
Результат NuxeoClient.Wrappers