Friday, November 26, 2010

Re: PIL issue opening an image file

Thanks Daniel, makes sense. I gather that what Bruno meant to say on his soapbox was that the file is in the HTTP request object and can/ should not be accessible from the hard disk?

I was familiar with that, as the file upload dialogue does the job of reading the file off the disk and into memory.

So I see where I went wrong :) I was trying to read the file off the disk. I'll see if I can manipulate the file in a view, where I have access to the request object.

Is that the gist of the problem?

Thanks Daniel!

On Fri, Nov 26, 2010 at 5:29 PM, Daniel Roseman <daniel@roseman.org.uk> wrote:
On Nov 26, 3:16 pm, Sithembewena Lloyd Dube <zebr...@gmail.com> wrote:
> Bruno, the file being uploaded has nothing to do with the deployment server.
> When you edit your Google profile to change your avatar, does the file
> upload dialogue browse a Google server?

No. But that has nothing whatever to do with the problem you are
experiencing.

At the point you are calling the save() method, the file has *already*
been uploaded. There is absolutely *no way* for Python code running on
the server to access files on your machine. (Can you imagine the
security implications if that were possible?)
--
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-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.com

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment