You might like to report this to the commons-upload guys

We basically wrap their
org.apache.commons.fileupload.FileItem class

On the other hand, I believe this to be the correct behavior.
As mentioned in the docs, the MIME type returned is
the one specified when the file was uploaded, i.e. what the browser
reports...
So, you may not want to rely on that


On 9/30/07, Gusti Benawi <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> The method getContentType() from IUploadFile doesnt check the mime type
> of the file, like it describes
>
>   String        getContentType()
>            Returns the MIME type specified when the file was uploaded.
>
> Instead, it only checks the extension of the file.
>
> So, the methode will for example returns a mimetype of image/jpeg, when
> a pdf-file which has .jpg extension is uploaded
>
>
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/request/IUploadFile.html
>
> regards,
>
> Gusti Benawi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

Reply via email to