Click or drag to resize

IResumableUpload 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: 13.3.13068
public interface IResumableUpload : IResumableUploadBase

The IResumableUpload type exposes the following members.

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.
Public methodCode exampleCancelUploadAsync
In this method implementation you can delete partially uploaded file.

You will implement this interface together with IUploadProgress 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 IUploadProgress interface description for more info).

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