You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@strayer hi, I was looking for a subdirectory option, but it seems it's not implemented in this package yet (related to #2)
We have the following use-case:
Join https://bucket_url/ with file_path for static files
Join https://bucket_url/uploads/ with file_path for media files.
Until now, I was juggling different data on local env (without gcloud storage) and staging where data paths were saved using /uploads/ prefix in db. But We messed up something, and staging data got saved in / , resulting in entities data being saved in 2 different locations (eg /uploads/users/1/image.jpg and /users/2/image.jpg).
I would like our data to behave consistently no matter the environment (ie do not save image paths with uploads/ prefix in db.
How would you go about uploading a file to https://bucket_url/uploads/users/3/image.jpg while saving /users/3/image.jpg in that user db row ?
Thanks for the support!
Cordially
Adrien
The text was updated successfully, but these errors were encountered:
django-storages[google] has a GS_LOCATION setting available. I'm not sure yet how to only use that option when uploading files, but if there's no solution available in django-gcloud-storage, I'll try migrating to that other package :)
Hey, sorry for not responding last year :/ I initially planned to implement this, but never came around actually doing it, so there is a bit of unfinished code on this topic. This would be a useful feature, but I can't commit much time to this project for the time being. If anyone wants to help with this, feel free to open a pull request!
@strayer hi, I was looking for a subdirectory option, but it seems it's not implemented in this package yet (related to #2)
We have the following use-case:
https://bucket_url/
with file_path for static fileshttps://bucket_url/uploads/
with file_path for media files.Until now, I was juggling different data on local env (without gcloud storage) and staging where data paths were saved using
/uploads/
prefix in db. But We messed up something, and staging data got saved in / , resulting in entities data being saved in 2 different locations (eg /uploads/users/1/image.jpg and /users/2/image.jpg).I would like our data to behave consistently no matter the environment (ie do not save image paths with
uploads/
prefix in db.How would you go about uploading a file to
https://bucket_url/uploads/users/3/image.jpg
while saving/users/3/image.jpg
in that user db row ?Thanks for the support!
Cordially
Adrien
The text was updated successfully, but these errors were encountered: