One time usable url for an object in spaces

October 15, 2019 142 views
DigitalOcean Spaces

I was going through the spaces api and I haven’t found what I was looking for. So basically what I’m trying to do is,

  1. Create a private bucket in spaces
  2. Create a url for an object that let’s users download the file
  3. Once the download is complete the url should no longer be valid i.e., it must be usable only once

Is something like this possible?

2 Answers

Hello,

I think that currently, Spaces doesn’t support this. You can share this idea with our product team by adding it to our UserVoice.

But what I could suggest is that you can generate signed URLs that expire in a defined period of time. Most S3 compatible libraries and tooling will allow you to generate these URLs. This might allow you to work around your need for one time usable URLs.

Hope that this helps.
Regards,
Bobby

Well, if you use spaces as private storage for your backend and then the URL goes via your backend code, then you can manage it there right?

Have another answer? Share your knowledge.