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

Incorrect upload URL for Digital Ocean #1328

Open
ethanitovitch opened this issue Oct 21, 2023 · 1 comment
Open

Incorrect upload URL for Digital Ocean #1328

ethanitovitch opened this issue Oct 21, 2023 · 1 comment

Comments

@ethanitovitch
Copy link

with settings like this:

DJANGO_AWS_STORAGE_BUCKET_NAME=BUCKET_NAME
STATIC_URL="https://BUCKET_NAME.nyc3.digitaloceanspaces.com/static/"
PUBLIC_MEDIA_LOCATION = 'media'
MEDIA_URL = "https://BUCKET_NAME.nyc3.digitaloceanspaces.com/media/"

Images are uploaded to BUCKET_NAME.nyc3.digitaloceanspaces.com/BUCKET_NAME/media and fetched from BUCKET_NAME.nyc3.digitaloceanspaces.com/media

With settings like this:

DJANGO_AWS_STORAGE_BUCKET_NAME=BUCKET_NAME
STATIC_URL="https://nyc3.digitaloceanspaces.com/static/"
PUBLIC_MEDIA_LOCATION = 'media'
MEDIA_URL = "https://nyc3.digitaloceanspaces.com/media/"

Images are uploaded to BUCKET_NAME.nyc3.digitaloceanspaces.com/media and fetched from nyc3.digitaloceanspaces.com/media

Currently I cannot find a correct configuration for digital ocean spaces. I've gotten things working many times in the passed (pre django 4.2) if this makes a difference

@ethanitovitch
Copy link
Author

I think the issue has to do with how the name of the url is being stored.

With the latter set of settings. Images are uploaded to the correct location but when fetching the BUCKET_NAME is not being added to the beginning of the url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant