NuxeoDotNetClient  1.0.0 beta
.NET Client for Nuxeo Automation and REST API
Public Member Functions | Properties | List of all members
NuxeoClient.Uploader Class Reference

Provides a cass for uploading files to a Nuxeo server. Files can be uploaded as a whole or in several chunks. More...

Public Member Functions

 Uploader (Client client)
 Initializes a new instance of Uploader. More...
 
Uploader SetChunked (bool isChunkedUpload)
 Sets whether files should be uploaded in chunks or not. More...
 
Uploader SetChunkSize (int size)
 Sets the chunk size. More...
 
Uploader AddFile (string file)
 Adds a file to the upload queue. More...
 
Uploader AddFiles (string[] files)
 Adds several files to the upload queue. More...
 
Operation Operation (string operationId)
 Creates a new instance of Operation to be executed on all uploaded files in the current batch. More...
 
async Task< EntityUploadFiles ()
 Uploads all files in the upload queue. More...
 

Properties

Batch Batch [get]
 Gets the batch to upload. More...
 
int NumConcurrentUploads = null [get]
 Gets the number of maximum concurrent uploads. More...
 
bool IsChunkedUpload = 5 [get]
 Gets whether uploads should be perform in chunks or not. More...
 
int ChunkSize = false [get]
 Gets the chunk size in bytes. More...
 

Detailed Description

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.

Definition at line 33 of file Uploader.cs.

Constructor & Destructor Documentation

NuxeoClient.Uploader.Uploader ( Client  client)

Initializes a new instance of Uploader.

Parameters
clientThe Nuxeo Client throw which the upload requests will be made.

Definition at line 65 of file Uploader.cs.

Member Function Documentation

Uploader NuxeoClient.Uploader.AddFile ( string  file)

Adds a file to the upload queue.

Parameters
fileThe path to the file to be uploaded.
Returns
The current Uploader instance.

Definition at line 97 of file Uploader.cs.

Uploader NuxeoClient.Uploader.AddFiles ( string[]  files)

Adds several files to the upload queue.

Parameters
filesAn array containing the paths to the files to be uploaded.
Returns
The current Uploader instance.

Definition at line 108 of file Uploader.cs.

Operation NuxeoClient.Uploader.Operation ( string  operationId)

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

Parameters
operationIdThe operation id.
Returns
A new Operation instance.

Definition at line 120 of file Uploader.cs.

Uploader NuxeoClient.Uploader.SetChunked ( bool  isChunkedUpload)

Sets whether files should be uploaded in chunks or not.

Parameters
isChunkedUploadA boolean that should be true if the upload is to be in chunks, or false otherwise.
Returns
The current Uploader instance.

Definition at line 75 of file Uploader.cs.

Uploader NuxeoClient.Uploader.SetChunkSize ( int  size)

Sets the chunk size.

Parameters
sizeChunk size in bytes.
Returns
The current Uploader instance.

Definition at line 86 of file Uploader.cs.

async Task<Entity> NuxeoClient.Uploader.UploadFiles ( )

Uploads all files in the upload queue.

Returns
A Task that will will return an instance of EntityList containing one instance of BatchFile per file uploaded.

Definition at line 130 of file Uploader.cs.

Property Documentation

Batch NuxeoClient.Uploader.Batch
get

Gets the batch to upload.

Definition at line 44 of file Uploader.cs.

int NuxeoClient.Uploader.ChunkSize = false
get

Gets the chunk size in bytes.

Definition at line 59 of file Uploader.cs.

bool NuxeoClient.Uploader.IsChunkedUpload = 5
get

Gets whether uploads should be perform in chunks or not.

Definition at line 54 of file Uploader.cs.

int NuxeoClient.Uploader.NumConcurrentUploads = null
get

Gets the number of maximum concurrent uploads.

Definition at line 49 of file Uploader.cs.