commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <>
Subject Re: [fileUpload] file content-type
Date Mon, 17 Apr 2006 15:51:13 GMT
On 4/17/06, Xav <> 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?

The content type for an individual part is specified by the browser (or
other client), so to affect it, you would need to modify the browser's
settings. Unless you have a very controlled user base, that's probably not
practical, so you'd need to determine the actual content type yourself.

Martin Cooper

> Xavier
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message