Click or drag to resize

IResumableUploadGetWriteStream 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
Stream GetWriteStream(
	long startIndex,
	long contentLength,
	long fileTotalSize,
	string contentType,
	string lockToken
)

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: Stream
Stream to write file content.
Exceptions
ExceptionCondition
NotFoundExceptionThis resource doesn't exist on the server.
WebDavHttpExceptionServer returned unknown error.
WebDavExceptionUnexpected error occurred.
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 IItemContent.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.IResumableUpload interface on server items.

See Also