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.
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
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.
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) https://github.com/blueimp/jQuery-File-Upload
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.
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.