Limited Spring session for specific tasks

时间:2015-07-28 16:17:22

标签: javascript ajax spring session

I'm currently implementing a Web-based application using Spring 4. In my application I allow users to upload files (around 10GB to 100GB big).

Right now, I'm using JavaScript to send huge files in chunks. In the server side I join all chunks into a single file and, at the end, I have the entire file uploaded. That's already working fine.

The problem is: although I'm uploading a big file in chunks, this operation might take a little while to finish. Since I'm using javascript to split up the file and send its chunks using Ajax calls, if the user goes to another page or even refresh the current page the upload stops because the javascript code is removed or refreshed.

I was wondering if there is any mechanism in Spring to create another kind of limited session only for upload purposes. By doing that, I'd let the upload run on this limited session and the current user session wouldn't be affected enabling the user to navigate normally through the application. I've seen in other posts we can actually create session aliases, but I'm not sure how to do that and if that'd solve my problem.

Any other ideas are welcome.

Thanks a lot!

0 个答案:

没有答案