Interface IMultiPartUploadStream
Interface extending System.IO.Stream's functionality to enable upload of large files in smaller parts to external storage.
public interface IMultiPartUploadStream
- Extension Methods
Properties
MaximalPartSize
Returns maximal size in bytes of a part that can be sent to external storage.
long MaximalPartSize { get; }
Property Value
- long
MinimalPartSize
Returns minimal size in bytes of a part that can be sent to external storage.
long MinimalPartSize { get; }
Property Value
- long
Methods
AbortMultiPartUpload(string)
Aborts multipart upload to external storage and should remove all resources already uploaded to external storage if necessary.
void AbortMultiPartUpload(string uploadSessionId)
Parameters
uploadSessionId
stringUnique identifier for multipart upload process to external storage. Is obtained by InitMultiPartUpload().
CompleteMultiPartUploadProcess(string, IEnumerable<string>)
Completes multipart upload process.
string CompleteMultiPartUploadProcess(string uploadSessionId, IEnumerable<string> partIdentifiers)
Parameters
uploadSessionId
stringUnique identifier for multipart upload process to external storage. Is obtained by InitMultiPartUpload().
partIdentifiers
IEnumerable<string>All unique identifiers of uploaded parts acquired by UploadStreamContentAsMultiPart(string, int) method.
Returns
- string
ETag of the uploaded file.
Remarks
Stream still needs to be disposed.
InitMultiPartUpload()
Inits multipart upload with external storage.
string InitMultiPartUpload()
Returns
- string
Unique identifier for multipart upload process to external storage. Returned unique identifier may be needed for each subsequent multipart upload operation.
UploadStreamContentAsMultiPart(string, int)
Uploads stream content to external storage.
IEnumerable<string> UploadStreamContentAsMultiPart(string uploadSessionId, int nextPartNumber)
Parameters
uploadSessionId
stringUnique identifier for multipart upload process to external storage. Is obtained by InitMultiPartUpload().
nextPartNumber
intNumber that defines position of the data obtained by the stream in the whole multipart upload process.
Returns
- IEnumerable<string>
Unique identifiers of currently uploaded parts to external storage.