Report this

What is the reason for this report?

How do I create a signed public 'share' URL similar to the 'Quick Share' option in Spaces?

Posted on October 16, 2017

How do I create a signed public ‘share’ URL similar to the ‘Quick Share’ option in Spaces?

I am writing an application in Node.JS and would like to return a temporary access URL to the user so they can access a file stored in spaces for a set amount of time. The Space itself is set to Private and the files are all Private as well, so just giving a direct URL to them isn’t possible.

The DigitalOcean UI already has this “Quick Share” feature, but there doesn’t seem to be any documentation about what its doing to create that URL and I cant figure out how to sign the request correctly to generate one myself.

The URL parameters in question are, AWSAccessKeyId, Expires and Signature. The AWSAccessKeyId and Expires seem simple enough, but how do I go about calculating the signature?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.