Huge file upload

谁说胖子不能爱 提交于 2019-12-11 01:24:23

问题


I have a web service that accepts really huge files. Usually in the range of 10 - 15 GB (not MB). However upload using a browser is only possible using Chrome on Linux. All 3 major browsers have different flaws trying to upload such a file:

  • Internet Explorer stops after exactly 4GB.
  • Firefox does not start at all.
  • Chrome (on Windows) transfers the whole file but fails to send the closing bondary (send 0xff instead).

Now we are searching for a way to get uploads to work. Preferably using HTML/JS only, but I see no way to make that happen. Second try would be flash, but FileReference seems to break for files > 4GB. Last way would be Java but that is not what we are looking for in the browser client.

Note that this is about the client. I know that the server side code works, as I can upload a 12GB file using standard HTML-Upload with Chrome on Linux. It is the only browser/os combination that works so far, but therefor I am sure, the server coode is fine.

Does anyone know any way to get huge file uploads to work?

Regards, Steffen


回答1:


There is a fairly young JS/HTML5 API which might cover your user case:

https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications

I can't speak to its suitability though.




回答2:


If you're using IIS, the default max file upload is 4GB. You need to change this in your script or your server settings.

See: Increasing Max Upload File Size on IIS7/Win7 Pro




回答3:


Normally you would break and upload such files in chunks using stream upload. If you take a limited amount data of the file, upload that part to the server, server appends data to the file. Repeat till complete file is uploaded. You can read a file in parts using FileStream (update: Adobe AIR only) or with javascript using the experimental Blob/FileReader. I guess this could be a workaround for the problem.

I think this solution could help: AS3 fileStream appears to read the file into memory

Let me know if this works out, its an interesting problem.



来源:https://stackoverflow.com/questions/12463655/huge-file-upload

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!