C# Class CmisSync.Lib.FileTransmission.ChunkedUploader

Chunked uploader takes a file and splits the upload into chunks. Resuming a failed upload is possible.
Inheritance: SimpleFileUploader
Datei anzeigen Open project: OpenDataSpace/CmisSync Class Usage Examples

Public Methods

Method Description
ChunkedUploader ( long chunkSize = 1024*1024 ) : System

Initializes a new instance of the ChunkedUploader class.

UploadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, bool overwrite = true, UpdateChecksum update = null ) : IDocument

Uploads the file. Resumes an upload if the given localFileStream.Position is larger than zero.

Method Details

ChunkedUploader() public method

Initializes a new instance of the ChunkedUploader class.
public ChunkedUploader ( long chunkSize = 1024*1024 ) : System
chunkSize long /// Chunk size. ///
return System

UploadFile() public method

Uploads the file. Resumes an upload if the given localFileStream.Position is larger than zero.
/// Contains the last successful remote document state. This is needed for continue a failed upload. ///
public UploadFile ( IDocument remoteDocument, Stream localFileStream, Transmission transmission, HashAlgorithm hashAlg, bool overwrite = true, UpdateChecksum update = null ) : IDocument
remoteDocument IDocument /// Remote document where the local content should be uploaded to. ///
localFileStream Stream /// Local file stream. ///
transmission Transmission /// Transmission status where the uploader should report its uploading status. ///
hashAlg System.Security.Cryptography.HashAlgorithm /// Hash alg which should be used to calculate a checksum over the uploaded content. ///
overwrite bool /// If true, the local content will overwrite the existing content. ///
update UpdateChecksum Is called on every new chunk, if not null.
return IDocument