Ugo Cei wrote:

Sylvain Wallez wrote:

A solution is to keep the uploaded content in a temp area until the form is valid. But what if the user leaves and never re-submits the form? Should we rely on the garbage collector to finalize() the upload widget to clean the temp area?


How about catching the expiration of the continuation and removing the temp file from there?


Good idea.

For this, we'll need some kind of "ContinuationExpirationListener". But they'll have to be registered in the continuation that _will_ be created at the next sendPageAndWait, as the latest continuation represents a past state, and may not exist if we just started the flowscript.

I think we must also use the cleanup on finalize() for cases where forms are used outside of flowscript (i.e. with actions).

Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com




Reply via email to