Question

Spaces. Custom domain and forcing file downloading.

I want to create a DO space for media files and to use it with my domain. Also I need an ability to provide download link for each media file. For example: http://mydomain.com/video.mp4 - To play video http://mydomain.com/download/video.mp4 - To download this file

Is it possible and how? Can you please share a link for steps to configure this.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hey there,

A custom CDN endpoint can be used for the domain customization: https://www.digitalocean.com/docs/spaces/how-to/customize-cdn-endpoint/

To make the files act differently (View vs. Download) you’ll want to modify the metadata of the separate files to act differently: https://www.digitalocean.com/docs/spaces/how-to/metadata/

It isn’t possible at this time to show the same file at two separate locations with different behaviour; having the file uploaded twice in Spaces/with separate metadata is necessary.

If you have any other questions or need anything else, just write back in and let us know! Thank you for being a DigitalOcean customer, we are here to assist you 24/7. :)

Regards, Ethan - Developer Support Engineer II - DigitalOcean