5. File Storage

Alex needs to store legal documents that clients upload.

Each project gets a dedicated Scaleway Object Storage bucket in your chosen EU region. The Storage page in the console gives you a file manager to upload, organize, and preview files.

Console features

  • Drag-and-drop upload — drop files or click to browse
  • Folders — organize files with a folder structure and navigate with breadcrumbs
  • Preview — images, PDFs, and text files render inline
  • Signed URLs — generate time-limited download links for any file
  • List & grid view — toggle between compact list and visual grid
  • Sharing — make a folder of your files readable by your app's users (signed-in or public)

Upload via SDK

// Upload a file
const file = document.getElementById('fileInput').files[0]
const { key, error } = await eb.storage
  .upload('contracts/nda-acme.pdf', file)

// Get a signed download URL (1 hour expiry)
const { url } = await eb.storage
  .createSignedUrl('contracts/nda-acme.pdf', 'download', { expiresIn: 3600 })

// List files in a folder
const { objects } = await eb.storage
  .list({ prefix: 'contracts/' })

// Download a file
const blob = await eb.storage.download('contracts/nda-acme.pdf')

// Delete a file
await eb.storage.remove('contracts/nda-acme.pdf')

Who sees which files

  • Each signed-in user owns the files they upload: only they can list, download, replace or delete them. Use keys that include the user's id (e.g. avatars/<user-id>.png) — the first user to upload a key owns it (until you upload to the same key from the console, which makes it yours).
  • Files you upload (console, your server with the secret key, edge functions) are private by default.
  • Signed URLs requested from your app expire after at most 1 hour.

Sharing a folder with your users

To let your app's users read files you provide — theme images, sounds, templates, premium content — open the folder in Storage and click Sharing:

  • Signed-in users — every signed-in user can download and list your files there. Show them with createSignedUrl(key, 'download').
  • Public — anyone with your project's public key can read them, no sign-in needed. Use getPublicUrl(key) (SDK 0.8.0+) for <img src>. Don't put anything private in a public folder.

Sharing covers only the files you upload: your users can't add or replace files in a shared folder (so don't share a folder they upload into), and their own files stay private. Subfolders are shared too. The exports/ folder (compliance archives) can't be shared.

// A file in a folder shared as "Public"
img.src = eb.storage.getPublicUrl('themes/nordic/hero.jpg')

// A file in a folder shared with signed-in users
const { url } = await eb.storage.createSignedUrl('premium/guide.pdf', 'download')

All files are stored in Scaleway Object Storage in France. No data ever touches US-based cloud providers.