commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <elihusma...@gmail.com>
Subject Re: [fileUpload] file content-type
Date Mon, 17 Apr 2006 15:51:53 GMT
I would suggest using a library that would check the file type of the
uploaded file.  This will give you a better idea of what the file is. 
It is the job of the browser to fill in this data, and based on the
browser, you can get differing values on the server side.


On 4/17/06, Xav <xxpikeboo@wanadoo.fr> wrote:
> Hello,
> I would like to filter the files uploaded, I thought a good way was to
> use the file content type but I realized that it is often
> application/octet-stream regardless to the file uploaded (.doc, .xls,
> .pdf, .txt...).
>
> Am I obliged to filter based on the file extension or there is something
> to tweak to get a more explicit content-type value?
>
> Thanks
>
> Xavier
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

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


Mime
View raw message