seed
seed copied to clipboard
upload media to s3
Any background context you want to provide?
When we upload files, we want to send them to s3 to limit storing locally
What's this PR do?
send uploaded files to an s3 bucket
How should this be manually tested?
first make sure you have no docker containers, images or volumes, clear everything. sudo docker volume create seed_media sudo docker volume create seed_pgdata sudo docker-compose up db-postgres db-redis sudo docker-compose up --build web web-celery
What are the relevant tickets?
#3446
Screenshots (if appropriate)
For testing, we could use minio to emulate s3 buckets, if that is an option and/or needed. https://min.io
@loydbanks thank you for your pull request. Can you work on the two main issues that I found during testing on my machine locally which is adding back in line 19 of config/settings/common.py (PROTOCOL) and figuring out the equivalent of get_available_name
method for default_storage
? I created a branch that adds back in the PROTOCOL line if you want to refer to that. I believe that I also ran the precommit test and had it fix those issues.
After that is done I will test out the s3 functionality.
All storage classes are subclasses of Storage, which has that function - https://docs.djangoproject.com/en/4.0/ref/files/storage/#django.core.files.storage.Storage.get_available_name
I fixed line 19 in config/settings/common.py
I created an issue in SEED (#3446) and linked it to this PR. I also ran precommit on this branch and linked it to that issue. I'm looking into dealing with the django test error.