drift Docs
Start
What is Drift?
The tour, if you are new here.
Why Drift?
The case for a smaller cloud.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, five unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.

Blobs

drift.Backbone.Blob: binary object storage, addressed by a path-shaped name.

Signatures

Go
// the name is path-shaped: "<bucket>/<key>", or bucket "default" with no slash
Put(name string, data []byte, contentType string) error   ·   Get(name string) ([]byte, error)

The SDK splits the name on its first slash, so Put("uploads/photo.jpg", …) stores bucket uploads, key photo.jpg.

Two edges worth knowing

A key containing a slash hides from listings.

Put("submissions/case-1/file.pdf", …) gives key case-1/file.pdf, which becomes a subdirectory on disk. blob list reads only the top level of a bucket and skips directories, so that blob never appears, and a slice snapshot walks the same listing, so it is absent from the archive too. Keep keys flat if you want them listed and backed up.

Content type is recorded and never read back.

Get returns the decrypted bytes with no Content-Type header, so a browser fetching a blob gets no type information from the platform. Set the header yourself in the function that serves the file, which on Drift means a Go handler, the only one that can set a response header.

An uploaded file arriving through a form is base64 and no SDK decodes it for you. Passing it straight to Put stores the base64 text rather than the file; see form posts and file uploads.