django-appengine-toolkit icon indicating copy to clipboard operation
django-appengine-toolkit copied to clipboard

GoogleCloudStorage and wrong paths in DB

Open sikor80 opened this issue 10 years ago • 0 comments

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

sikor80 avatar Aug 25 '14 20:08 sikor80