It doesn't. If you allow file uploads you run into an obvious problem. If the uploader hits the maximum file size limit, the connection is closed because you can only send a response after processing all of the input and the entire reason behind the maximum file size limit is to stop people from uploading massive files. So what you do is check the file size with Javascript first so you can tell users that they are over the limit.