struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shifman <mark.shif...@yale.edu>
Subject Re: FileUploading Error
Date Wed, 18 Feb 2004 14:07:52 GMT
I am using Mozilla 1.2.1. via redhat.  How can I see what is passed   
without doing an autopsy on the request handler?
mas

Andrew Hill wrote:

>Hmmm. Sounds rather like a browser issue to me. You might want to see what
>is actually being passed in that request - if its actually a valid multipart
>request or not!
>
>I had a try in IE, but IE's file selector is too smart to allow selection of
>a folder as the upload file. Which browser are you using?
>
>-----Original Message-----
>From: Joe Germuska [mailto:Joe@Germuska.com]
>Sent: Tuesday, 17 February 2004 00:13
>To: Struts Users Mailing List
>Subject: Re: FileUploading Error
>
>
>At 9:35 AM -0500 2/16/04, Mark Shifman wrote:
>  
>
>>In trying to bulletproof file uploading I noticed something odd.
>>
>>If I type some junk in the field for the file name and hit Submit, I get
>>a file of size 0. I can deal with that.  If I type in a directory name
>>in my home directory (admittedly a dumb thing to type) nothing seems to
>>happen and I get this error in my log file.
>>
>>ERROR 2004-02-13 14:09:18,679
>>handleRequest(CommonsMultipartRequestHandler.java:241)
>>Failed to parse multipart request
>>org.apache.commons.fileupload.FileUploadException: Processing of
>>multipart/form-data request failed. Stream ended unexpectedly
>>...
>>
>>This error seems to be thrown before it even gets to my UploadAction.
>>How do I catch this and tell the user the file typed in is invalid?
>>    
>>
>
>In Javascript, the "value" of the form field is the path to the file;
>you might be able to apply a mask validation testing for a reasonable
>filename -- this is far from perfect, but may help.  I use this as a
>cheap way to get around the lack of support for the "accepts"
>attribute -- I test to see if the file has a "right extension" using
>the mask validator.
>
>Just one thought...
>
>Joe
>
>--
>Joe Germuska
>Joe@Germuska.com
>http://blog.germuska.com
>       "Imagine if every Thursday your shoes exploded if you tied them
>the usual way.  This happens to us all the time with computers, and
>nobody thinks of complaining."
>             -- Jef Raskin
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>


-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shifman@yale.edu



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message