-2

I am trying to upload a file of size 12GB ,my RAM size is 4GB so ,i am able to upload only 2GB files i am not getting any idea on how to proceed further. Any help is highly appreciable

Thomas W
  • 13,940
  • 4
  • 58
  • 76
b singh
  • 105
  • 2
  • 8
  • It probably could depend on the operating systems (and processors), both on the client side (your laptop) and on the server side. Some 32 bits filesystems limit size to 2Gbytes. Try using 64 bits operating systems (and JVMs). BTW, are you sure you have the bandwidth and time to upload such a big file. Can't you split it into smaller pieces (e.g. using [csplit](http://www.computerhope.com/unix/ucsplit.htm) or some equivalent). – Basile Starynkevitch Oct 01 '13 at 04:25
  • but i want to divide it using my program so that once i upload the smaller files i can merge it into single file as it was in the initial stage.any idea? – b singh Oct 01 '13 at 04:37
  • Yes it is possible to merge several files (e.g. obtained by splitting) into one. On Posix systems you'll use the [cat](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cat.html) command. – Basile Starynkevitch Oct 01 '13 at 04:59
  • yes i too know this but what i asked you is i want it to be done automatically ,i mean my application will ask the user to select a file to upload then the application will divide it and then upload it, after upload is done it merge it again into a single file.any idea on this? – b singh Oct 01 '13 at 05:11
  • I believe you have a wrong approach and a wrong design. Consumer users should not even expect to upload a 12Gb file without great pain (and a lot of time, that they don't have). – Basile Starynkevitch Oct 01 '13 at 05:12
  • may be but because i am struck here so could you provide me some information on how to split it using a code in the program – b singh Oct 01 '13 at 05:16
  • possible duplicate of [uploading a 15 Gb file and downloading it in playframework for java.is it possible?](http://stackoverflow.com/questions/19086449/uploading-a-15-gb-file-and-downloading-it-in-playframework-for-java-is-it-possib) – Carsten Oct 01 '13 at 12:08

1 Answers1

1

This won't work, send it by FTP or a Javascript/AJAX uploader instead.

HTTP is not a good protocol to choose for this.. the filesize is ridiculously far beyond the known limitations of HTTP servers and gateways. The server has to buffer the upload before it can be handled, and your filesize will exceed most known buffers.

HTTP uploads are often expected to handle 5MB - 50MB and limited in the 5MB - 200MB range. Proxy servers & network infrastructure will likely also impose their own limits.

See also: What is the maximum file size I can transfer using HTTP? And using FTP?

Community
  • 1
  • 1
Thomas W
  • 13,940
  • 4
  • 58
  • 76