[Answer]-How to upload a file using Django and Google App Engine Blobstore API

1👍

If you’re not uploading the file as part of a Django form, you can manually handle the uplaod as per BlobStore instructions, then fetch the BlobKey, and save it as a string in your Django model. That’s probably the most straighforward way to go.

https://developers.google.com/appengine/docs/python/blobstore/

Another option is to take the storage component in djangoappengine (designed for Django-nonrel), and adapt it for use with normal Django. I don’t think there’s any reason why this shouldn’t work (after you put some effort into adapting it)

https://github.com/django-nonrel/djangoappengine/blob/master/djangoappengine/storage.py

Leave a comment