Skip to main content
Send filename and declaredSizeBytes, up to 100 MiB. Returns file metadata and uploadUrl. PUT the file bytes to that URL with the required x-ms-blob-type: BlockBlob header. After the PUT succeeds, finalize the upload.

Signature

Method signature on client.files:

Parameters

string
required
Project ID with prefix pp..
string
required
Name of the file being uploaded.
number
required
Declared maximum file size in bytes, up to 100 MiB.

Returns

Promise<{ file: ProjectFile; uploadUrl: string }>
ProjectFile
required
A file stored in a project.
string
required
Signed URL for uploading file bytes with a PUT request and the x-ms-blob-type: BlockBlob header.

Errors

HTTP errors throw PotatoApiError. The endpoint documents these error responses: HTTP endpoint: POST /projects/{projectId}/files.