I'm trying to implement an ImageField for a model in my Django app. The app runs on Google App Engine. However upon upload (local machine, using GAE SDK 1.7.7) I get an [Errno 78] Function not implemented
.
The error originates from a call to os.makedirs()
in django.core.files.storage.FileSystemStorage._save()
; the argument for the call to makedirs
is:
u'/Users/.../PycharmProjects/myproject/media/uploaded
My MEDIA_ROOT
entry in SETTINGS.PY
contains:
/Users/.../PycharmProjects/myproject/media/
My MEDIA_URL
entry in SETTINGS.PY
contains:
/media/
The media directory contains a sub-directory named 'uploaded'. I checked the privileges and they have required read/write access.
The field definition for my ImageField is:
image = models.ImageField(upload_to = "uploaded/"
For some reason Django wants to create the directory which already exists. Using the Django console os.path.exists(u'path/to/media/upload')
returns True (which is correct) so I do not understand why Django wants to create the directory.
Additionally, I use Google Cloud SQL for storage and installed PILLOW for image handling. I also added PIL as library in my app.yaml
.
I'm probably missing something elementary, but am clueless at the moment to what's causing this...