Development

#4483 (sfWebRequest returns file extension "bin" when uploading a pdf file with Firefox under Mac OS)

You must first sign up to be able to contribute.

Ticket #4483 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

sfWebRequest returns file extension "bin" when uploading a pdf file with Firefox under Mac OS

Reported by: bascht Assigned to: fabien
Priority: minor Milestone: 1.0.20
Component: controller Version: 1.0.17
Keywords: upload mimetype Cc:
Qualification: Unreviewed

Description

I'm not sure if this applies to all firefox versions, but with my setup (Firefox 3.0.1, Mac OS 10.5.5) an uploaded pdf-file has the mimetype application/x-pdf and

$fileRequest->getFileExtension('my_uploaded_document'); 

returns the file extension "bin", which is obviously wrong. Same file, same app works fine, when using Safari. I took a look at /usr/share/php/data/symfony/data/mime_types.dat - and the x-pdf mimetype isn't listed there. Is x-pdf an "official mimetype"?

Tell me, if I can supply more information.

Attachments

mime_types_new.dat (15.2 kB) - added by bascht on 09/24/08 16:35:27.
added the missing mime-type

Change History

09/24/08 16:35:27 changed by bascht

  • attachment mime_types_new.dat added.

added the missing mime-type

09/24/08 16:38:29 changed by bascht

Works for me, when adding the correct extension:

<?php

  $types = unserialize(file_get_contents('mime_types.dat'));
  $types["application/x-pdf"] = "pdf";
  asort($types);
  file_put_contents('mime_types_new.dat', serialize($types));

11/27/08 09:29:00 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [13386]) [1.0, 1.1, 1.2] added mime type for PDF (closes #4483)

11/27/08 09:30:06 changed by fabien

(In [13387]) [1.1, 1.2] added mime type for PDF (closes #4483)

11/27/08 09:30:22 changed by fabien

  • milestone set to 1.0.20.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.