Prevent Download of DO Spaces Files

Is it possible to prevent direct download to images and videos in Spaces? I have added a policy to prevent direct browser access to images but it’s not a bullet proof way to prevent downloads like saving the webpage or through sources panel in chrome.

We allow streaming and viewing of images but we want to prevent downloading.

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

One way to do this would be to make the objects private in Spaces and then use a pre-signed URL to access the file.

For example, if you are using Laravel you could do that with “Temporary URLs” as described here in the docs:

This should be supported for other major frameworks too.

If you want to see natively supported by Spaces, the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

Hope that helps!

- Bobby.