presignUpload().
Parameters
Omit
folder, key and folderId and the asset lands in the project’s default folder.
See Folders & Paths for how paths resolve.
Returns
sizeBytes is a number. The API sends it as a string — Postgres BIGINT columns
serialise that way over JSON — and the SDK converts it, so a.sizeBytes + b.sizeBytes
adds rather than concatenating.Transforming on upload
Anything intransform is applied before storage, so the transformed result is what gets
stored and returned. The original is not kept.
url() instead keeps the original intact and
serves any number of variants from it.
Uploading a stream
A NodeReadable is read fully into memory before sending, because fetch can’t stream a
multipart body. For large files that’s a reason to prefer
presignUpload(), which sends the bytes
straight to storage.
Errors
Uploads are never retried automatically — see Errors & Retries.