By lilboat
hi i am using django and i have setup a digitalocean spaces for public upload. now everything is working correctly. but it is showing accesskeyid expiresid in images/staticfiles url in html page. i dont want to show access keyid and expiresid with images/static files url for example: https://nyc3.digitaloceanspaces.com/example/medias/kmml/trki1d-7321-447f-8346-93.jpg?AWSAccessKeyId=jhbfjbfjdfkjigfji&Signature=wSdPz8x6Co%2BYmThvG9yi09j9418%3D&Expires=1584285699
i just want it to be https://nyc3.digitaloceanspaces.com/example/medias/kmml/trki1d-7321-447f-8346-93.jpg in html.
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.
To remove the AccessKeyID and Expires from your DigitalOcean Spaces image URL, you’ll want to make your Space public. By doing this, you’d ensure that your files are accessible without authentication parameters.
Here’s how to make your DigitalOcean Space public:
Keep in mind that making your Space public allows anyone with the file URL to access the content. If you still want to keep your Space restricted, you can create a proxy for your images and serve them through your backend (Django) without exposing the access key.
For more details on working with Django and DigitalOcean Spaces, check out the DigitalOcean tutorial on setting up object storage with Django.
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.