I use
$ext = $uploadedFile-guessExtension() == null ? $uploadedFile-
getExtension() : $uploadedFile-guessExtension();
where uploadedFile is a field of my entity (not persisted) used in the
forms.
I followed the cookbook:
http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html
and
btw - zip for docx is not that far off.
docx-files are essentially zipped xml-files ;)
sincerely
louis
2011/6/17 Gustavo Adrian comfortablynum...@gmail.com:
Thanks for the tip! Yes, this topic is a real headache. I had this type of
issue on centos too (although I don't remember with which
I've just tried nowand my script doesn't work too for incorrect
mime types...
--
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 users group.
To post
Yes. You can even open the zip without problems. But anyway that's not the
correct mime type. And it's not the only case it detects the wrong mime
type. That's why I, sadly, have to use the original extension and mime type
until I find a better and consistent solution. I know it's not the best way
yes same problem here.
I'm on ubuntu too.
I' think it's a problem bound to proprietary file types.
Take a look at /etc/mime.types for mime supported by your system.
For me the problem comes with .doc documents. It says that it is a
application/vnd.ms-office instead of ms-word
This is why
Thanks for the tip! Yes, this topic is a real headache. I had this type of
issue on centos too (although I don't remember with which filetypes). For
now I'm handling this problem in the insecure way.. using the mime and
extension sent by the browser, and marking the file as insecure in that
case.