I just want to elaborate this question: How does HTTP file upload work?. This is the form from the question:
<form enctype="multipart/form-data" action="http://localhost:3000/upload?upload_progress_id=12344" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
What happens when the file is really large (i.e. 10 GB)? Does the browser put all the data into 1 request then send it to the server? How does the browser read the file and build the request(s) when it has only 2 GB of RAM?
Let say the file is a CSV. Assuming the server has little RAM and Disk space. Is there a way to stream the file to the server so that the server can parse each line instead of keeping the whole file in its RAM or Disk?
Detailed explanations are much appreciated (HTTP, TCP, etc.)