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.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

efox
DigitalOcean Employee
DigitalOcean Employee badge
May 28, 2019
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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more