Revision history [back]

click to hide/show revision 1
initial version

asked 2013-10-07 04:50:49 +0800

FrankyDude gravatar image FrankyDude

How to handle big (large) file upload and download?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload / download solution put the byte stream of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- Same principle I am looking for when 'downloading' a file from server to client's browser -> file bytes should be sent from server to client's browser directly. The server - such as ZK framework - should not read complete file content into memory first before having to start sending it to the client, this could cause memory issue.

3- (optional, but a very nice to have for end users uploading/downloading large files) How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help, Frank

How to handle big (large) file upload and download?upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload / download solution put the byte stream of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- Same principle I am looking for when 'downloading' a file from server to client's browser -> file bytes should be sent from server to client's browser directly. The server - such as ZK framework - should not read complete file content into memory first before having to start sending it to the client, this could cause memory issue.

3- 2- (optional, but a very nice to have for end users uploading/downloading large files) How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help, Frank

How to handle big (large) file upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload solution put the byte stream array representation of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- (optional, but a very nice to have for end users uploading/downloading large files) How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help, Frank

How to handle big (large) file upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload solution put the byte array representation of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- (optional, but a very nice to have for end users uploading/downloading large files) files)

How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help, help,

Frank

How to handle big (large) file upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload solution put the byte array representation of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- (optional, but a very nice to have for end users uploading/downloading large files)

files) How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help,

help, Frank

How to handle big (large) file upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload solution put the byte array representation of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- (optional, but a very nice to have for end users uploading/downloading uploading large files) How would you plug a progress bar to this solution while transferring (upload or download)?

Thank you for any help, Frank

How to handle big (large) file upload?

Hi all,

I was wondering what would be the solution for handling big file upload (let's say 50mb, but it could also be a couple gigabytes...)?

I am running Grails 2.0.x with ZKUI 0.5.4 (ZK 6.x) if my memory serves. I am using MVVM all over the place, and we are already able to manage file upload and file download, but since default file upload solution put the byte array representation of files being transferred into memory, server will eventually crash an out of memory exception if file is just too large.

1- What I am looking for is a solution for MVVM that, for uploads, uses the file's byte stream to saves the the file content directly on disk (through the use of a customizable - in size - buffer). This way, no matter how big the file is, there would never be an out-of-memory issue since we are not reading the 'whole' file into memory, just a piece of it for each read cycle (the buffer size).

2- (optional, but a very nice to have for end users uploading large files) How would you plug a progress bar to this solution while transferring (upload or download)?uploading?

Thank you for any help, Frank

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More