sfFileValidator

About symfony tutorials, symfony book and API documentation.

Moderators: dwhittle, Ian

sfFileValidator

Postby ouillonn » Fri Jan 18, 2008 12:13 am

Hi everybody,

I think it may be usefull to write down in the documentation of sfFileValidator that the order of the mime-types is actually VERY important, especially for the Internet Explorer.

I had an interesting experience with that little trap. I added the mime "image/gif" in the middle of the list like that:

Code: Select all
    sfFileValidator:
      mime_types:     
        - 'image/jpeg'
        - 'image/png'
        - 'image/gif'
        - 'image/x-png'
        - 'image/pjpeg' 


and the IE didnt get it and threw the mime-error-message. But if I change the order to

Code: Select all
    sfFileValidator:
      mime_types:     
        - 'image/jpeg'
        - 'image/png'
        - 'image/x-png'
        - 'image/pjpeg'
        - 'image/gif' 


everything works fine.

Maybe this is a stupid request, maybe I'm blind. But actually, its quiet amberrant! So I hope this will help some people out there!

Greets from Berlin
ouillonn
Member
 
Posts: 67
Joined: Fri Jul 13, 2007 12:45 am

Return to Documentation

Who is online

Users browsing this forum: No registered users and 2 guests