Hello everybody! I'm currently new in WebFaction services, just deploying my first Django Application. Everything worked fine until I've tested a file upload form. The structure I've built is: a static application for serving static files, a static application for serving media files (for e.g app_media, located in ~/webapps/app_media) In myproject.settings.py, the MEDIA_ROOT is /home/<user>/webapps/app_media/. However, when I try to upload a file (in admin or in every site form), I get the error: Upload a valid image. The file you uploaded was either not an image or a corrupted image. I've checked and the Python Imaging Library (PIL) looks installed. I can import it in shell. Can somebody give me a little help? Thanks a lot. asked 29 Feb '12, 06:23 trd002200 |
This does seem related to PIL, however it's hard to say what the problem is without looking at the actual Django app. I'd suggest that you open a ticket about it. answered 29 Feb '12, 07:26 todork |
I thought this too but... the problem was that I made a terrible mistake. The MEDIA_ROOT should remain the absolute path to the folder where the files will be uploaded, not to the media serving application. Everything works just fine. answered 29 Feb '12, 07:49 trd002200 Glad to see you've worked it out.
(29 Feb '12, 07:50)
todork
|