Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sites like Yousendit are offering payed uploads of up to 2GB. How is this done through a standard web form? or are they using something else?

My thoughts were that a standard input file field couldn't handle 2GB files to save its life.

share|improve this question

migrated from Apr 3 '11 at 10:29

This question came from our site for professional and enthusiast programmers.

3 Answers 3

There is no reason a standard file input field couldn't handle files up to 2GB (above that, however, things may get tricky). Most servers, however, are configured by default with a fairly small hard limit, which is there to limit excessive resource usage.

What would kill you is the lack of any decent progress indicator for the user. Submitting a normal file input field will cause their browser to sit there for hours on end with barely any indication that the upload is even happening successfully.

This is where I've seen Flash come to help. There are many sites, like flickr and YouTube which use (or can be made to use) the Flash plugin to provide a friendlier uploading experience, including feedback that the upload is happening and even perhaps a progress bar.

share|improve this answer

Now in 2015 it is possible to do even without flash(as mentioned in @thomasrutter's answer), using usual js/ajax. Here is the one of the plugins (perhaps the most popular one)

it supports chunked upload

If maxChunkSize is set to an integer value greater than 0, the File Upload plugin splits up files with a file size bigger than maxChunkSize into multiple blobs and submits each of these blobs to the upload url in sequential order.

so, theoretically it should not matter how big your file is, 2 GB or 20 GB, it will send the data part by part.

share|improve this answer

In traditional HTML, the process of uploading a file is to land on a web page that contains a text box along with a button next to it named "choose" or "browse" or whatever name your browser decides to give it. The box by itself is not expected to hold millions of characters. It just merely holds the name of the local file to be uploaded. This name can then be set/changed simply by choosing the adjacent button and selecting a new file in the file selection box that appears.

Once the upload button is pressed, then all data is "post"ed. This means instead of seeing millions of characters in the address bar, the characters (including all the characters that make up the file) directly get sent to the server right after the initial headers (hence POST).

Because the data type is multipart/form-data, the data sent to the server will likely be chunked and the data might have separators set in between so the server knows what is in each section of the long uploaded data.

As for handling, the server will need to execute some kind of script to actually process the file. Even PHP scripts can handle large uploaded files. The file would most likely be moved from the temporary location (where it's uploaded to) into the user's folder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.