• Post Reply Bookmark Topic Watch Topic
  • New Topic

large File uploads through Http Service

 
venkata Silla
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

I need to built a file upload service which should be memory effective.I should avoid loading the entire file into memory,Since I may have multiple http request which will pile up the Heap memory.Can you please suggest the effective way to upload a large file(For ex:1GB file) using http Streaming.I need to do the file upload on a single http call.Let's consider a scenario where 1 GB file to be uploaded using 512MB Heap memory.Not Sure If practically I can achieve this or not.Please advice any best practices.


Appreciate your help..


With Regards,
Silla.
 
Stefan Evans
Bartender
Posts: 1822
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best practice: Use a library to do this.
Apache commons File Upload component can possibly deal with it.
 
venkata Silla
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan Evans wrote:Best practice: Use a library to do this.
Apache commons File Upload component can possibly deal with it.


How does the memory management happens while using apache streaming api ?Does it loads the entire Stream object in memory ?when the user uploads a file from the GUI ?.Thanks a lot for the information.
 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
venkata Silla wrote:
Stefan Evans wrote:Best practice: Use a library to do this.
Apache commons File Upload component can possibly deal with it.


How does the memory management happens while using apache streaming api ?Does it loads the entire Stream object in memory ?when the user uploads a file from the GUI ?.Thanks a lot for the information.


I think that if you'll read the Apache Commons File Upload documentation you'll find the answers to these questions.

http://commons.apache.org/proper/commons-fileupload/using.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!