Upload files
Single-request, legacy, and multipart upload flows.
Single-file upload
Authenticated uploads use the account visibility default unless overridden with visibility=private or visibility=public. Anonymous uploads may only be public; requesting private returns 400.
FieldTypeBehavior
filefileRequired upload contentsvisibilitystring"private" or "public"; account default when omittedexpiryDaysnumber1–3650; defaults to 365maxDownloadsnumber0 means unlimitedrandomizeNamebooleanReplace stored filename when trueurlTypestring"uuid" or "short"Legacy upload
This route remains supported for existing clients. It is always public, rejects visibility=private, and keeps its short-link default and 30-day expiry ceiling.
cURL
curl https://mbr.pub/api/upload -F "[email protected]" -F "expiryDays=7"Multipart lifecycle
Initialize with file metadata, upload numbered binary parts, then complete with each returned ETag. Abort removes the pending R2 and database state.