jquery - Session object with time to live -


I have created a contact form using Spring MVC that allows file attachment.

To store AJAX, I need to try a different approach with attaching files, so I used to upload jQuery file. As soon as the user selects a file, it is uploaded immediately, and since then I do not want to go through the disk, so I store it on session and retrieve it later if the user submits the press .

The problem comes with the disposal of this object in this session. If the user presents the form, then I have got a sync point where I can extract the object from the session so that the memory can be freed. But if the user selects the file, then leaves the submission without submitting, the file stays in the session for the whole lifetime.

I would like to know that this is a solution to the problem or if this solution can be of a meaning to it

Any other problem that I have not understood at all is

Comments