Skip to content

Signed URLs and keys

Short-lived links to private files, links to upload one file, and the keys servers use.

Applies to EngineCloud
View as Markdown
On this page
  1. Signed download URLs
  2. Signed upload URLs
  3. Keys

Signed download URLs

TypeScript
const { url } = await files.bucket('receipts').signedUrl('order-1042.pdf', { expiresIn: 300, download: 'recibo-1042.pdf' });

A signed URL works for anyone who has it until it expires (1 second to 7 days; 1 hour by default). Creating one is checked against your select policies. Image transform options can be part of the signature, so a signed thumbnail cannot be turned into the full image.

Signed upload URLs

TypeScript
const { url, token } = await files.bucket('uploads').signedUploadUrl('forms/42/id.jpg', { expiresIn: 7200 });
// give url+token to a browser or device that has no session; it can upload exactly this path, once

Keys

KeyWho uses itWhat it can do
publishable keybrowsers and apps, with a user’s tokenonly what policies allow to anon or the user
secret keyyour serverseverything: bypasses policies; never put it in a browser
S3 access keyS3 toolsthe buckets and actions you scope it to

In Sypnia Cloud, a project’s publishable and secret keys are the same for Data and Files. A secret key sent from a browser (Origin header present) is refused.

  1. Signed download URLs
  2. Signed upload URLs
  3. Keys

    Search pages, sections and terms