Tool Reference
UploadFile
Upload an existing file to Mosaic from base64-encoded bytes, up to 25 MiB decoded.
Starter documentation. Features and account details may differ from this deployment.
UploadFile
Upload an existing file to Mosaic from base64-encoded bytes, up to 25 MiB decoded. Use for PDFs, images, Office files, and other files; use CreateDocument for generated text or native Mosaic spreadsheets. Encode actual file bytes programmatically; never invent or transcribe binary content. Returns a document ID after the bytes are uploaded; preview and indexing may finish asynchronously. Does not read local paths or fetch URLs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fileName | string | Yes | Filename including its extension, for example report.pdf. Do not include a directory path. |
contentBase64 | string | Yes | Standard padded base64 of the exact file bytes (maximum 25 MiB decoded). No data URL prefix or whitespace. Prefer constructing this argument programmatically from the file. |
projectId | string | No | Optional destination project (folder) ID. Requires edit access. Omit to upload to the user's top-level files. |