Click or drag to resize

IResumableUploadAsyncCancelUploadAsync Method

IT Hit WebDAV Classes Reference
In this method implementation you can delete partially uploaded file.

Namespace:  ITHit.WebDAV.Server.ResumableUpload
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
Task CancelUploadAsync()

Task CancelUploadAsync()

Return Value

Type: Task
.
Exceptions
ExceptionCondition
LockedExceptionThis folder was locked. Client did not provide the lock token.
NeedPrivilegesExceptionThe user doesn't have enough privileges.
InsufficientStorageExceptionQuota limit is reached.
DavExceptionIn other cases.
Remarks

Often during long-continued upload you will keep the old file content to be returned by GET requests and store the new file content in a temporary file (or temporary field in database, etc). To delete this partially uploaded content client can submit CANCELUPLOAD command, the Engine will call this method in this case.

If the item was automatically checked-out by the Engine when upload started it will be automatically checked-in by the Engine after this call.

Examples
Request:
CANCELUPLOAD /LargeFile.doc HTTP/1.1
Host: http://server:8580/
Response:
HTTP/1.1 200 OK
Examples

The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.

public async Task CancelUploadAsync()
{
    await DeleteAsync(new MultistatusException());
}
See Also