BarakatX2 wrote:
> When I do:
>
> print type(f)
>
> It outputs:
>
> <type 'str'>
>
> Also when I try to get the filename using the name property of
> UploadedFile, it says:
>
> 'str' object has no attribute 'name'
>
> When I just print f it shows:
>
> ëPNG

Try something like this code:

for fname, fvalue in request.FILES.iteritems():
    print fname # This is the submitted file name
    print type(fvalue) # This is the file object

-RD

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

Reply via email to