[Helma-user] file upload changes?
Franz Philipp Moser
philipp.moser at chello.at
Wed Aug 15 11:02:04 CEST 2007
Hi,
thanx for the fast reply, I was just wondering what is going on.
Hannes Wallnoefer schrieb:
> Hi Philipp,
>
> The problem is not related to file type, but to file size.
You are right I've tested it with a 1MB gif and it wasn't stored.
> The change with 1.6.0 final is that file uploads are stored to
> temorary files rather than kept in memory from a certain size upwards
> (I think it's 10 kb, but I'm not sure). To avoid cluttering the
> disks, temporary upload files are deleted immediately after the
> request terminates. The other option would have been to let cleanup
> happen automatically, because temporary files are deleted when the
> java object is garbage collected. I didn't find this 100% reliable
> though, so I opted for the direct deletion.
>
> This means you have to save uploaded files immediately in the request
> that handles the upload.
My multiple page upload now stores the pics with a random number and
after the second page moves it to the right location and name.
> Maybe I've been too paranoid here, because the automatic deletion
> should work in 97% of cases. Please let me know what you think.
so I implement the functionality in my app that was provided by helma
before 1.6.0 final. So the deletion of tmp files has shifted to the app.
I think its a good idea to "free" the memory from big files and delete
them after a request so +1 for that.
I should keep an eye on this when developing new apps.
Thanx again to clear things up.
> hannes
<snip />
cu Philipp
More information about the Helma-user
mailing list