we are setting up a website that hosts mp3 files on spaces. We want it in such way that if the visitor clicks download, the mp3 doesn’t have to open a player. We want instant download
how do we achieve this with spaces?
sample link https://spacename.sfo2.digitaloceanspaces.com/filename.mp3
with dropbox i could easily add &dl=1
how does it work with spaces?
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!
Hello,
What you could do is modify the metadata of the file and set the Content-Disposition which indicates if a regular file should be displayed inline in the web browser or downloaded as an attachment. For more information you could take a look at the official documentation here:
https://www.digitalocean.com/docs/spaces/how-to/set-file-metadata/
Hope that this helps! Regards, Bobby
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.