IResumableUploadAsyncGetWriteStreamAsync Method (Int64, Int64, Int64, String, String)
IT Hit WebDAV Classes Reference
Saves files's partial content to WebDAV server.
Namespace:
ITHit.WebDAV.Client
Assembly:
ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax Task<Stream> GetWriteStreamAsync(
long startIndex,
long contentLength,
long fileTotalSize,
string contentType,
string lockToken
)
Function GetWriteStreamAsync (
startIndex As Long,
contentLength As Long,
fileTotalSize As Long,
contentType As String,
lockToken As String
) As Task(Of Stream)
Task<Stream^>^ GetWriteStreamAsync(
long long startIndex,
long long contentLength,
long long fileTotalSize,
String^ contentType,
String^ lockToken
)
abstract GetWriteStreamAsync :
startIndex : int64 *
contentLength : int64 *
fileTotalSize : int64 *
contentType : string *
lockToken : string -> Task<Stream>
Parameters
- startIndex
- Type: SystemInt64
Index to the first byte in the file content to be set by the request. - contentLength
- Type: SystemInt64
Length of data to be written. - fileTotalSize
- Type: SystemInt64
Total size of the resource content. - contentType
- Type: SystemString
Media type of the file. - lockToken
- Type: SystemString
Lock token for this file.
Return Value
Type:
TaskStreamStream to write file content.
Exceptions Remarks
This method issues a PUT request and appends Content-Range header of the form Content-Range: bytes 21010-35145/47022 if necessary.
It will attach Content-Range: bytes XXX-XXX/XXX header only if partial content is submitted. You can always use this method instead of IItemContentAsync.GetWriteStream as Content-Range header is not attached if you upload entire file.
To upload partial content to IT Hit WebDAV Server Engine you must implement ITHit.WebDAV.Server.ResumableUpload.IResumableUploadAsync interface on server items.
See Also