[Seaside] Problem with zip file and mimetype

Philippe Marschall philippe.marschall at gmail.com
Fri Jun 12 07:49:48 UTC 2009


2009/6/12 Mariano Martinez Peck <marianopeck at gmail.com>:
> Hi folks! I am having a problem with mimeType for zip files. I have a zip
> file that I am trying to upload to a Pier component called Gallery. This
> component expects a file with mimeType "application/zip".
>
> 1) Situation in Ubuntu and firefox:
>
> After debugging I found this problem: My file is called "fotos.zip" and if I
> do in a linux console: file -i fotos.zip y get "application/zip".
> However, when I uploaded it to seaside, the mimeType is interpreted as
> 'x-zip-compressed'. When debugging, I saw MAFileModel  then WAFile and then
> MultipartChunk. In MultipartChunk  initializeFrom: aDictionary there is this
> code:
>
> contentType := header at: 'content-type' ifAbsent: [MIMEDocument
> defaultContentType].
>
> In this case, header at: 'content-type' answers me "x-zip-compressed". And
> if I see
> HttpRequest>>nextChunkHeader   it is also there like "x-zip-compressed".
>
>
> 2) Situation in Windows Vista and firefox:  the same as 1)
>
> 3) Situation in Windows Vista and IE:
> header at: 'content-type' answers "key not found"  :(
>
> Does someone know what can be happening?

The browser sends the file as "x-zip-compressed".

Cheers
Philippe


More information about the seaside mailing list