File Upload and Download Limits

Over the last few years, we’ve had a few questions about WinINET’s limits for file upload and download. I’ve summarized those limits in the following table:

 

Upload (total size)

Download (per file)

Internet Explorer 6

2gb 2gb (4gb for Chunked or Connection-Close transfers)

Internet Explorer 7

2gb 4gb

Internet Explorer 8

2gb 17,592GB

Internet Explorer 9 to 11

4gb 17,592GB

 

  • In Internet Explorer 8, we raised the maximum file size that can be downloaded from 4GB to the 17TB, the maximum file size storable in the NTFS file system. In practice, most NTFS volumes are limited to 2TB, and you of course will almost certainly run out of disk space (or download quota) long before reaching that mark.
  • In Internet Explorer 9, we fixed an integer wraparound bug in the file upload code. Prior to the fix, file uploads between 2gb and 4gb would send a negative value in the Content-Length header.

Large File Uploads

You may notice that even IE11 is limited to 4gb uploads, but that's not a significant problem because websites should never try to upload large files (e.g. >50mb) directly in modern browsers.

Instead, utilizing the HTML5 FileAPI supported in IE10+ (and all other major browsers), the file should be sliced into pieces that are individually uploaded using JavaScript. The advantage to this approach (beyond allowing uploads of any size) is that it enables rich progress notifications to the user and resumption of incomplete uploads. This is the approach used by video upload sites like YouTube, for instance.

If you're not ready to move to the slicing approach, you can still use the FileAPI to warn the user if they attempt to upload a file that is over 4gb in size:

 <script>
function checkSize(inputControl)
{
 if (typeof FileReader !== "undefined") {
 var cbSize = inputControl.files[0].size;
 if (cbSize > Math.pow(2,32)) alert("File too large for normal upload; it's " +cbSize + "bytes.");
 }
}
</script>
 <form action="FileForm.asp" method="POST" enctype="multipart/form-data">
<input id="fileentry" type="file" name="fileentry" size="35" onchange="checkSize(fileentry);">
<input id="inpChar" type=hidden name="_charset_">
<input id="inpSub" type="submit" value="Submit using multipart/mixed">
</form>

You may wish to do this because otherwise a silent submit failure occurs.

-Eric