Signed URLs and keys
Short-lived links to private files, links to upload one file, and the keys servers use.
On this page
Signed download URLs
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
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, onceKeys
| Key | Who uses it | What it can do |
|---|---|---|
| publishable key | browsers and apps, with a user’s token | only what policies allow to anon or the user |
| secret key | your servers | everything: bypasses policies; never put it in a browser |
| S3 access key | S3 tools | the 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.