2

I'm trying to figure out different ways to achieve very large file uploads/downloads. I'm new to node.js and it looks like it may be the answer to my question but before dive in I need to be sure this way I can manage files uploads (5 to 15 Gb) without any memory issues or similar. I can consider using php / ruby or .net as technology (I don't know much about node.js but if it works I'll study enough to solve my problems).

What's your opinion / experience ?

thanks

user1170896
  • 719
  • 1
  • 7
  • 19
  • It's not a good idea to give users possibility to upload that big files, IMO. However if you are going to use php you have to modify `php.ini` you can simply find configurations in google. – Leri Jun 09 '12 at 13:54
  • no php.ini and max_memory_limit stuff is definitely not an option. And unfortunately uploading very large files is the main client request – user1170896 Jun 09 '12 at 14:06

1 Answers1

1

The trick is to break the file into chunks, and deal with the chunks.

I've seen someone do this using mongodb gridFS (http://fuz.io)

take a look at http://www.componentix.com/blog/13/file-uploads-using-nodejs-once-again as it may give you some ideas.

Last Rose Studios
  • 2,461
  • 20
  • 30
  • ok.. that's a starting point. Is there any way to make rails app and node.js app work together? – user1170896 Jun 09 '12 at 14:08
  • Yes there is, dead simple way is to have rails render the form and submit to the node server. You can also do it in a more dynamic method adding javascript to ruby side. http://stackoverflow.com/questions/6884382/node-js-formidable-upload-with-xhr/6890081#6890081 has some details about how that can be done. – Last Rose Studios Jun 09 '12 at 14:13
  • Sorry my fault, I mean something related to sessions variables or similar. Since it's sopposed to be an app where users upload files and specify other users to share with. – user1170896 Jun 09 '12 at 14:17
  • not sure about session variables, but you could share a database between both apps, or use something like redis pub/sub – Last Rose Studios Jun 09 '12 at 14:20