I haven't worked very much with the forms part of symfony, so I don't know
if this is related to the problem.  But why are you using
admin_input_file_tag instead of the normal input_file_tag?  Unless it's in
the admin generator, i don't think there's any reason to use the admin_
helpers.

On Dec 30, 2007 8:21 PM, ktoon <[EMAIL PROTECTED]> wrote:

>
> I use the admin_input_file_tag to allow user upload an image. But i
> can't check the file type. The validator file is:
>
> methods:
>  post:
>    -"avatar{galleryid}"
>    -"avatar{image}"
>
> names:
>  avatar{galleryid}:
>    required:      true
>    required_msg:  The Gallery is required
>
>  avatar{image}:
>    required:      true
>    required_msg:  Image is required
>    file:          true
>    validations:   imageValidator
>
> imageValidator:
>  class: sfFileValidator
>  param:
>    max_size: 2000000
>    max_size_error: Max size is 2M
>    mime_types:
>      - 'image/jpeg'
>      - 'image/png'
>      - 'image/gif'
>    mime_type_error: YOu must upload a JPEG or a PNG or a GIF file
> >
>


-- 
"Doh!"  - Homer Simpson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to