[ic] File upload values not preserved in Session

Stefan Hornburg racke at linuxia.de
Wed Jan 18 03:57:37 EST 2006

Ed Criscuolo wrote:
> I've been having a lot of problems with file uploads.  My application
> requires
> uploading multiple image files.  I want to upload them all, one at a
> time,
> and not write any of them to files until after they're all uploaded.
> What I've found is that the "file" values become corrupted before I can
> write
> them out to files.  If I only upload one file and save it right away, it
> works fine. If, however, I try to upload a second file befor saving the
> first 
> one the second one is fine but the first one is corrupted.  It saves
> successfully,
> but produces a zero length file.
> I also found that the "test=length" attribute of the "value-extended"
> tag
> incorrectly returns the length of the FILENAME instead of the length of
> the file! 
> The second problem's just an annoyance, but the first one's a killer.
> Can anybody help?

You are correct, the file contents are not saved in the user's session.
Otherwise the session would be grow unnecessarily, which in turn would
consume RAM without much gain.

Save the file as temporary file in the tmp/ folder.


More information about the interchange-users mailing list