Html Form : bad mime type for .zip files

Situation

I have the following form :

<form action="/url/to/action" method="POST" enctype="multipart/form-data">
    <ul>
        <li><label>File1 <input type="file" name="file1" /></label></li>
        <li><label>File2 <input type="file" name="file2" /></label></li>
        <li><input type="submit" value="Import"/></li>
    </ul>
</form>

Using Firefox :

  • when I upload a *.gz file, it is sent with mime-type : application/x-gzip
  • when I upload a *.xml file, it is sent with mime-type : text/xml
  • This is ok. However :

  • when I upload a *.zip file, it is sent with mime-type : text/html instead of application/zip
  • (I checked the content of the POST request in the Firebug console.)

    I'm pretty sure it worked not that long ago.

    Question

    Is this bug related to Firefox ? Has anybody else experienced it ?

    I'm running FF 29.0 / Ubuntu 14.04.


    也许尝试将mimetypes添加到.htaccess中

    AddType application/zip zip ZIP
    
    链接地址: http://www.djcxy.com/p/47030.html

    上一篇: 使用django格式检查文件类型:'application / octet

    下一篇: Html表单:用于.zip文件的bad mime类型