Upload File

View as Markdown
Upload a durable file into a space. Use space storage for user inputs, generated files, and files that may later be staged into runtimes.

Authentication

AuthorizationBearer

Use Bearer <api-key>.

Path parameters

idstringRequired

Request

This endpoint expects a multipart form containing a file.
filefileRequired
File bytes to upload into the space storage mount.
metadatastringOptional

Optional JSON object string with caller-owned file metadata.

namestringOptional<=255 characters
Optional display filename for the stored file.
pathstringOptional<=4096 characters
Optional relative destination path. Must not be absolute or contain . or .. path segments.

Response

Default Response
contentTypestring>=1 character
createdAtstring
expiresAtstring or null
idstringformat: "uuid"
namestring1-255 characters
pathstring1-4096 characters
sizeBytesinteger0-9007199254740991
status"ready"
metadatamap from strings to any or null