PresignUploadUrlOptions
type PresignUploadUrlOptions = { bytes: number; clientOriginalBytes?: number; fileName: string; mime: string; presets?: RequestablePreset[]; sha256: string; video?: UploadVideoOptions; visibility?: "public" | "private"; warm?: ImageRole[];};Defined in: packages/sdk/src/index.ts:525
Input shape accepted by aq.assets.presignUploadUrl(...).
Properties
Section titled “Properties”bytes: number;Defined in: packages/sdk/src/index.ts:531
Byte length of the upload payload.
clientOriginalBytes?
Section titled “clientOriginalBytes?”optional clientOriginalBytes?: number;Defined in: packages/sdk/src/index.ts:547
Pre-compression size of the source (useful when the browser ran
compressorjs / heic2any before computing bytes). Recorded
server-side, so the savings show up in the admin usage dashboards.
fileName
Section titled “fileName”fileName: string;Defined in: packages/sdk/src/index.ts:533
Suggested file name; surfaces in admin dashboards + extension fallback.
mime: string;Defined in: packages/sdk/src/index.ts:529
MIME type of the bytes (e.g. image/jpeg, video/mp4).
presets?
Section titled “presets?”optional presets?: RequestablePreset[];Defined in: packages/sdk/src/index.ts:541
Variant ladder to generate after /assets/process. Defaults to
["original"] server-side when omitted — same contract as aq.upload.
RequestablePreset, not VariantPreset: hls and mp3 are
things a variant can BE, never things you can ask for, and asking is a 400.
sha256
Section titled “sha256”sha256: string;Defined in: packages/sdk/src/index.ts:527
Full sha256 (64 hex) of the bytes that will be PUT to storage.
video?
Section titled “video?”optional video?: UploadVideoOptions;Defined in: packages/sdk/src/index.ts:549
VIDEO-only delivery knobs forwarded into /assets/process. See UploadVideoOptions.
visibility?
Section titled “visibility?”optional visibility?: "public" | "private";Defined in: packages/sdk/src/index.ts:565
Private at upload. "private" makes the asset private from its first
byte — the row is born private, so no public door ever serves it (on a
tenant whose default is private the CDN denies it even before the row
exists). Omit to get the tenant default ("public" unless your tenant
was set up private). Read it back with getPrivateAssetUrl.
optional warm?: ImageRole[];Defined in: packages/sdk/src/index.ts:557
Image roles whose transform ladder (IMAGE_ROLE_LADDERS) the platform warms
at the CDN edge once the asset is ready, so the first visitor does not pay
a cold encode. Omit to warm nothing. Ignored for non-images and when the
bytes were already stored (a deduped upload runs no processing; use the
backfill for those).