garmoncheg / django_multiuploader_example_usage

Usage example for repo of the plugin django_multiuploader by me
http://garmoncheg.blogspot.com/
28 stars 15 forks source link

Error trying to use App Engine datastore. #4

Open rogcg opened 12 years ago

rogcg commented 12 years ago

I'm trying to use App Engine datastore.

I had success deploying and it works until I try to upload, an error message shows in server log:

ValueError: The App Engine storage backend only supports BlobstoreFile instances or File instances whose file attribute is a BlobstoreFile.

I believe that the error is because in models.py it uses django's model class, which is models.FileField, but AppEngine requires db.BlobProperty().

Any idea of how to fix it?

garmoncheg commented 12 years ago

Not even sure... According to common logic you have to override file field in multiuploader models.py. E.g. use BlobstoreFileField instead of django's FileField. You have to inherit file field and add required conversions. BUT I'm pretty sure that this is Google! GAE and someone done this before... And it is a part of python SDK already (maybe)... No other ideas come to mind... I have never deployed on google (YET)