This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
My co-worker did some investigating work with this using AJAX and the workflow was something like:
- upload the file in one request
- server intercepts the upload, determines the size of the file from the headers
- in a seperate request ask the server how many bytes have been uploaded.
The key is to uniquely identify the file being uploaded. The way my co-worker did it was to assume one file being uploaded per http session, so the uploading code updated the number of bytes/total number under a known key in the session.
That is a bit lame, but sufficient as a proof of concept
He did have to modify the commons upload code, but it was only a few lines and he found it very easy.
Sorry I cannot be more help, but I wasn't involved
could you post some piece of your solution, or explain how you did it ?
I'm searching for an ajax-file-upload solution ready out of the box, so that i can replace my uploadFileController with an ajaxUploadFileController.