By DrSpaceman
I have a django site that allows image uploads from the admin panel via summernote. These images are all stored in a Spaces folder. There are no problems uploading images.
After uploading I can view the site and the images are there with no problem. However if I was 1-2 hours and check again, the pictures return a 403 error.
While it’s up I can copy the image link and put it into a URL and the picture loads fine. Once the 1-2 hours is up, that doesn’t work anymore.
It’s like there is some sort of active timer set on the photos or something?
Looking at my URL for the image it does seem to have some sort of expiration code. But I’m not sure how to make that go away.
https://sfo3.digitaloceanspaces.com/<my project folder>/django-summernote/2021-09-25/a361e3aa-ea6e-4328-92b9-e9ffc2cc3ca3.png?AWSAccessKeyId=<access id> &Signature=><signature>&Expires=1632614952
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
It sounds like you are utilizing pre-signed URLs for your images on DigitalOcean Spaces. These URLs are generated with an expiration time for access, which seems to align with the timer you’re noticing.
To solve this issue, you should either generate the pre-signed URLs with a longer expiration time or consider making your content publicly available, so you don’t need to use pre-signed URLs to access the content. Of course, consider your privacy and security needs carefully before making content public.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.