Download large files with Ruby

I am wondering what is the best template that allows you to upload large files to the server using Ruby.

I found Rails and large, large file downloads: looking for an alternative , but it does not provide any specific solutions.

I do not want to use Rails, since I am working on a simple download server that will work offline. I assume that Sinatra might be the key, but I don't know which web server I should use to start it without increasing the latency.

I also need this web server for simultaneous download.

UPDATE: By โ€œlarge filesโ€ I mean between 200 MB and 5 GB.

UPDATE2: Since these files are video (in my case), I can have a maximum size of 2 GB, for example, youtube.

+4
source share
2 answers

ok I do a little work here, but: if you use couchdb as the target for your downloads, you will get rid of the timeout problem. consider couchdb as some โ€œtemporaryโ€ memory in this example. therefore, if the download is complete, you can take the file with couchdb and do whatever you want with it. I was able to upload files up to 9gb in size over the dsl line in couchdb without any drama. this might read a little, but I think you can make it work.

couchdb has a lot of rail stones, so it plays great with others;)

Let me know if you want to go down this rabbit hole so that I can give you a few more pointers.

0
source

passenger recommends using a separate apache / nginx module to handle downloads.

0
source

All Articles