On Wed, Mar 23, 2011 at 9:34 PM, Tony <[email protected]> wrote: > Ive tried it the other way but when it appends the filename the final > slash is the other way. Either way, the octal thing you said hasn't > had an effect Im pretty sure. The url in the error message appears to > be the path it should be. Is there any other reason? >
What the SuspiciousOperation error means is that the ultimate file path (the one in the exception message) was not found to be "under" the MEDIA_ROOT path. That is, if you say MEDIA_ROOT is /home/kmt/webapp/ then Django will not allow a file to be uploaded to /home/xyz or /home/kmt or /...the files all have to be uploaded to /home/kmt/webapp/something_more. Django will not allow writing uploaded files to outside of the MEDIA_ROOT tree. Having an octal escape sequence in MEDIA_ROOT is going to cause a problem. If forward slashes don't work (they should, though) then try doubling the backslashes or making the string raw. Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

