Geoff Howard wrote:

Stephen Ramsay wrote:

On Sun, Sep 14, 2003 at 10:01:05PM -0400, Geoff Howard wrote:

Stephen Ramsay wrote:

On Sun, Sep 14, 2003 at 08:33:01AM -0400, Geoff Howard wrote:

Aha! That wiki example has a problem I just noticed -- you shouldn't return null here (I just corrected the wiki). Use the corrected version above - I'll explain below.

Well, Geoff, I just can't get it to work. I'm no longer getting 404s, but it's still not uploading the file.

How do you know? By default, the servlet cleans up the file at the end of the request (I think -- it didn't used to be this way, but I think this was done when this was refactored to address some security concerns). So, unless you are reading your debug statements (which it seems you're not getting) you wouldn't know.

I just finally got a second to look at the code, and my vague memory was right. During a security related refactoring of the upload code before 2.1M1 (U2/MLK fans may be interested to know it was early morning, April 4 by complete coincidence) an unconfigurable (means it can't be turned off) step was added to the CocoonServlet at the end of the request processing which automatically removes the temporary files saved during the upload process when autosave-uploads is set to true. Until that point, it was possible to set the upload directory to the final desired location of the uploads. By design, this is no longer possible. Either from flow script or an Action, the application programmer must move the file if they desire it to persist past the end of the request.


I've just now added a brief debugging statement to the servlet mentioning the multipart cleanup.

HTH,
Geoff


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to