Uploads
Upload a file of any size and get its handle, or ask a person for a file or a secret with an upload link. The handle names the stored value.
Agents with a shell send parts straight to storage through presigned
URLs; a person uploads from their own device through a link's page (or
the inline picker in hosts that render apps). Either way the result is a
file handle you can pass to any operation that takes a recording,
document or image; create stores it as a pdf, image or audio value
when you want one.
A link for a secret asks for one credential instead, such as a password or an API key: the person types it on the page, it goes to the organization's secret store, and you get only its handle, which you write into the record that uses it. Ask this way whenever you need a credential nobody has given you, never in the conversation.
Operations
- Abort an upload.
DELETE /Platform/uploads/{upload_id} - Get an upload's status.
GET /Platform/uploads/{upload_id} - Complete an upload.
POST /Platform/uploads/{upload_id}/complete - Ask a person for a file or a secret.
POST /Platform/uploads/links - Check an upload link for files.
GET /Platform/uploads/links/{link_id} - Open an upload session.
POST /Platform/uploads/init - Get fresh upload URLs for parts (direct mode).
POST /Platform/uploads/{upload_id}/part-urls - Upload one part (proxied mode).
PUT /Platform/uploads/{upload_id}/parts/{part_number} - Save the secret a secret link asks for.
POST /Platform/uploads/links/{link_id}/secret - Upload a file in one request, as the raw request body.
POST /Platform/uploads/file
Objects
UploadAborted
upload_id: str. Upload session identifier.status: "aborted". The upload was aborted.
UploadCompleteResponse
hash: optional str or null. Stored dtype handle.dtype: optional str or null. Detected dtype class name.size: optional int or null. Stored byte length.content_type: optional str or null. Detected media type.filename: optional str or null. Original filename.deduped: optional bool. Whether existing content was reused.upload_id: str. Upload session identifier.status: "done". The upload is complete.
UploadInitResponse
upload_id: str. Upload session identifier.mode: "direct" or "proxied". Part transport mode.part_size: int. Maximum bytes in each part.part_count: optional int or null. Expected number of parts.part_urls: optional Dict[str, str] or null. Presigned PUT URLs by part number.parts_received: optional List[int]. Already received part numbers.
UploadLink
link_id: str. Upload link identifier.url: str. Page to give the person; it requires signing in as the account that created it.kind: optional "file" or "secret". file: the person picks files. secret: the person types one credential, and files[0].hash is its handle.purpose: optional str. What the files are for, shown on the page.sites: optional List[str]. For a website login's password: the sites a browser may type it on, shown on the page. The handle is bound to them.max_files: int. How many files the link accepts.status: "pending" or "done" or "expired". pending: nothing uploaded yet; done: at least one file arrived; expired: closed with none.expires_at: float. When the link stops accepting files (Unix seconds).files: optional List[UploadFile]. Files uploaded through the link so far.
UploadPartResponse
part_number: int. One-based part number.etag: str. Storage ETag for the received part.size: int. Received byte length.
UploadPartUrls
part_urls: Dict[str, str]. Presigned PUT URLs by part number.expires_in: int. URL lifetime in seconds.
UploadStatusResponse
upload_id: str. Upload session identifier.mode: "direct" or "proxied". Part transport mode.phase: "open" or "done" or "aborted". Stored upload phase.size: optional int or null. Declared or completed byte length.part_size: int. Maximum bytes in each part.parts_received: optional List[int]. Already received part numbers.status: "open" or "done" or "aborted". Current upload state.result: optional UploadFile or null. Stored file when complete.part_urls: optional Dict[str, str] or null. Fresh URLs for missing parts.