views:

82

answers:

1

I've used django ImageFieldFile, from django.db.models.fields.files import ImageFieldFile

now I want to restrict the user to use only Image files when uploading from browser

A: 

Try this http://www.djangosnippets.org/snippets/1303/

and (regarding your comment below) if you want client-side validation, take a look at this thread on the topic

NB: relying on client side validation only is not going to be safe enough. If you're concerned about people uploading other file types, you need to also validate on the server.

stevejalim
I need validation on client side ! or Browser File with Acceptance of only *.jpg, *.png like...
Tumbleweed
I've expanded my answer to take this into account.
stevejalim