Home
english
Home
.NET Server
Java Server
.NET Client
AJAX Client
AJAX Browser
Map Drive
Pricing
Contacts
info@ithit.com



Uploading Files to WebDAV Server in AJAX Application in IE and Legacy Browsers

This article applies to Internet Explorer as well as to Safari 3, Firefox 3.4, Chrome 3 and earlier versions.

While WebDAV standard requires files to be uploaded via PUT verb, Internet Explorer and legacy browsers listed above support only upload via POST. In addition Firefox 3.5 and later can upload files of only up to 100Mb in size via PUT verb. This article describes how to upload a file to IT Hit WebDAV Server Engine using POST request in the above listed browsers.

Uploading using POST Multipart Request

The IT Hit WebDAV Server Engine for .Net and for Java can process files submitted with POST multipart request. The following example uploads a file to /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>

When creating a multipart POST form make sure you follow this rules:

  1. Specify enctype="multipart/form-data" attribute on a form tag.
  2. Add name attribute to a single input type=file tag.
  3. DO NOT add name attribute to any other input, select, textarea tags.

Always submit only one file per form. The server will be unable to calculate file size correctly if any extra input/select/textarea values submitted due to POST request standard limitations.

Action attribute can specify a folder or a file url. If the file with such name does not exist it will be created. If the file already exists it will be overwritten.

Note that maximum file upload size in most browsers is 2Gb.


Selected Customers:
Country: Norway
DnB NOR Group
Country: Finland
Bank of Finland
USA
Symantec
Country: Sweden
Toyota
Country: Denmark
Danfoss Group
Country: USA
Microsoft
Country: Ukraine
Raiffeisen Bank
Country: USA
Siemens
Country: Ukraine
OTP Bank
Country: USA
Intel Corporation
Country: Austria
Austrian Federal Railways
Country: Israel
Autodesk, Inc.
Country: USA
U.S. Customs and Border Protection Agency
Home .NET Server Java Server .NET Client AJAX Client AJAX Browser Map Drive Pricing Contacts

Updated: Friday, July 23, 2010