Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File upload with the ability to resume (preferably in Ruby on Rails)

this is quite a difficult topic by all accounts. I am building a website that requires users to upload large (multi-GB). What is the best way allow users to upload a file on a website and allow the file upload to be resumed should it fail? What is the way to write this in rails?

Any ideas greatly appreciated.

Max.

like image 839
user7289 Avatar asked Dec 30 '09 01:12

user7289


3 Answers

No browsers support resuming uploads.

From my Googling, Flash doesn't seem to, either.

Though I don't know enough about Java to say it's impossible, there don't seem to be any pre-rolled upload solutions that support this method.

In short, you would have to code your own out-of-browser/plugin solution. If that is not feasible, you may have to abandon this feature. Sorry!

EDIT: Actually, after using a better search query, here's a Java solution that seems to support this through partitioning the initial file: JumpLoader. Here is the documentation page for resuming downloads. Best of luck! (You will note that there are purchase links - this is only for an unbranded version, and for the source code. You can use the JumpLoader branded version for free.)

like image 181
Matchu Avatar answered Oct 18 '22 20:10

Matchu


No browser support this, In fact this cannot be done over HTTP.

You will have to write your own java applet, ActiveX control or WPF browser application to achieve this. Any of this will speak to a TCP server listening on the server side to achieve pause-and-resume upload of file.

like image 28
this. __curious_geek Avatar answered Oct 18 '22 20:10

this. __curious_geek


Six years since you asked, but for future viewers, take a look at ResumableJS. It uses HTML5 File API to break uploads into chunks. They also include a RoR example for accepting the upload.

like image 40
dkam Avatar answered Oct 18 '22 19:10

dkam