Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload media to s3 #3431

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

loydbanks
Copy link

@loydbanks loydbanks commented Jul 27, 2022

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)

@nllong
Copy link
Member

nllong commented Jul 27, 2022

For testing, we could use minio to emulate s3 buckets, if that is an option and/or needed. https://min.io

@anchapin
Copy link
Contributor

anchapin commented Aug 4, 2022

@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.

@loydbanks
Copy link
Author

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

@anchapin
Copy link
Contributor

anchapin commented Aug 9, 2022

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.

@isalanglois isalanglois added the Maintenance Tag as maintenance if the issue relates to general cleanup, maintenance, etc. Do not delete label. label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Maintenance Tag as maintenance if the issue relates to general cleanup, maintenance, etc. Do not delete label.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants