Hi You should not trust the informations sended by the browser but let the server guess the correct MIME type. Symfony has validator that do the job for you: http://www.symfony-project.org/api/1_4/sfValidatorFile
More precisely, look at the three methods: * guessFromFileBinary($file) Guess the file mime type with the file binary (only available on *nix) * guessFromFileinfo($file) Guess the file mime type with PECL Fileinfo extension * guessFromMimeContentType($file) Guess the file mime type with mime_content_type function (deprecated) Goulwen On 9 août, 07:15, Richtermeister <[email protected]> wrote: > Hi Devs, > > I'm increasingly running into mime type issues for file uploads, the > latest being that I can't upload PDF files, as my Mozilla3 sends those > as binary/octet-stream types, and symfony saves them as .bin files > accordingly. > I've also encountered this problem when I use a flash uploader to > upload multiple files, and they all arrive as .bin files as well. It's > very hard to dance around this issue, because the mime detectors don't > have access to the original filename, so at least taking a hint off > the file extension is not readily possible. I know that that's > considered unreliable, but in the absence of a more accurate/flexible > mime recognition system, I'm not sure what else to try. > > Anybody else having these problems? > > Daniel -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
