django-appengine-toolkit
django-appengine-toolkit copied to clipboard
GoogleCloudStorage and wrong paths in DB
When uploading files to GCS using such model: logo = models.FileField(upload_to='resource_logo')
and such settings: APPENGINE_TOOLKIT = { 'APP_YAML': os.path.join(BASE_DIR, 'app.yaml'), 'BUCKET_NAME': 'some-bucket', } DEFAULT_FILE_STORAGE = 'appengine_toolkit.storage.GoogleCloudStorage' STATICFILE_STORAGE = 'appengine_toolkit.storage.resource_logo/file.jpg'
The file indeed gets uploaded to my some-bucket but there are two issues
- the file should be set to public / word readable by default
- the path in the DB is saved as /some-bucket/resource_logo/file.jpg instead of resource_logo/file.jpg like it should