files.put
Stores bytes and returns a stable, on-domain URL; public images also resize via query params.
Store.put(content, options?) → StoredFile
Writes bytes from the backend and returns a StoredFile with a stable, on-domain URL. Set contentType and filename for correct serving; omit the key to mint a UUID, or pass contentAddressed for an immutable hash-named key. cacheControl tunes CDN caching per put, and public images then resize through width, height, and format params so you serve the displayed size rather than the original.
Parameters
content
Buffer | string
RequiredBytes to store.
options
object
{ key, contentType, filename, cacheControl }
Store a PDF
const file = await Reports.put(buffer, { contentType: 'application/pdf' }); file.url; // stable URL