On Nov 26, 2:03 pm, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote: > I found the issue: it is the path to the image. When I change the problem > line to > > image = Image.open(os.path.realpath('C:\Users\Lloyd\Desktop\Lloyd.png')) > > it works, but I cannot hard code the path and I cannot predict where the > user will try to upload a file from. Isn't there a way to dynamically get > the path from the file upload dialogue where the user browses to it and > selects it? > > Thanks...
Why were you using photo.name as the path in the first place? photo.path stores the full path to the image, as noted in the documentation: http://docs.djangoproject.com/en/1.2/ref/files/file/ -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.