Click or drag to resize

IResumableUploadAsync Interface

IT Hit WebDAV Classes Reference
Implemented by a file that supports updating parts of its content.

Namespace:  ITHit.WebDAV.Server.ResumableUpload
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
public interface IResumableUploadAsync : IResumableUploadBase

public interface IResumableUploadAsync : IResumableUploadBase

The IResumableUploadAsync type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleBytesUploaded
Amount of bytes successfully saved to your storage.
Public propertyCode exampleLastChunkSaved
The date and time when the last chunk of file was saved in your storage.
Public propertyCode exampleTotalContentLength
Total file size that is being uploaded.
Top
Methods
  NameDescription
Public methodCode exampleCancelUploadAsync
In this method implementation you can delete partially uploaded file.
Top
Remarks

You will implement this interface together with IUploadProgressAsync interface when you would like to provide one or more of the following features:

  • Pause/resume uploads.
  • Restore broken uploads.
  • Upload from AJAX using POST verb and create upload progress bars. Required in IE 9 and earlier only.
  • Upload to ASP.NET/IIS-based server files over 2Gb.

The WebDAV Server Engine can process two types of upload requests:

  • PUT upload. Files uploaded via PUT by most WebDAV compliant clients.
  • POST upload. Files uploaded via POST verb by Ajax applications running in Microsoft Internet Explorer 9 and earlier.

To provide information about what segment of a file is being uploaded, the client application will attach optional Content-Range: bytes XXX-XXX/XXX header to PUT request.

Internet Explorer 9 and earlier limitations is unable to randomly read file content and upload content using PUT verb. To overcome this limitation the Engine can process files uploaded using POST verb. Internet Explorer 9 and earlier still can display upload progress submitting upload-progress REPORT request (see IUploadProgressAsync interface description for more info).

Examples
The following example demonstrates upload to WebDAV server using POST with multipart encoding. The file will be created in /mydocs/ folder.
<html>
    <head><title>POST Upload to WebDAV Server</title></head>
    <body>
        <form action="/mydocs/" method="post" enctype="multipart/form-data">
            <input type="file" name="dummyname" /><br />
            <input type="submit" />
        </form>
    </body>
</html>
See Also