Skip to content
Advertisement

How can I upload to different buckets in Django and Google Storage?

I’m able to upload a file in Google Storage but the problem is that it goes to the default bucket where my static files are: GS_BUCKET_NAME=’static-files’

I’d like to continue uploading the static files to the ‘static-files’ bucket, but I would like to also upload the user files to a different bucket: ‘user-upload-files’

How can I do this in Django 3.2.7, Python 3.9.7

For reference, right now I’m doing:

JavaScript

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement