Adam Gordon wrote:
We're using Struts 1.2.9 and the problem we're seeing is that if a user tries to upload a file that does not exist or upload a file that exceeds the maxFileSize attribute the FormFile object on the ActionForm is null and so we cannot distinguish between the two.

We thought about removing the maxFileSize parameter and doing the check ourselves in the ActionForm, but it appears that the file upload has already begun at that point and while we can look at the Content-Length header from the HttpServletRequest object in the Struts Action, it's a moot step because the file has already begun to upload.

Couldn't you keep the maxFileSize parameter then use the Content-Length header to distinguish the two cases? Short of writing your own implementation of MultipartRequestHandler, I don't think there's anyway to hook into the file upload handling.

L.


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

Reply via email to