## Signature

```text
upload_file({ source_url?, filename?, content_type?, bytes?, file_id? })
```

Choose the path supported by your environment:

- **MCP-only or inaccessible attachment:** call with `{}` and give `upload_page_url` to your human. They sign in to the agent's workspace and drag/drop or choose a file. Keep `file.id` and poll `get_files` until ready. Opening the link does not grant the agent access to a chat attachment.
- **Local file access:** use `scrollport upload_file /path/reference.png`. The CLI reserves storage then streams bytes to Scrollport. Do not paste binary or base64 into a tool call.
- **Direct download URL:** call with `source_url` and optionally `filename`. Imports accept public HTTPS URLs on port 443 with a supported content type and Content-Length. Private addresses and unsafe redirects are rejected. Use browser/CLI upload if the source needs cookies or does not report a size.

For a custom HTTP client, pass `filename`, `content_type` and positive `bytes`. PUT the original raw bytes to `upload_url` using `Authorization: Bearer <upload_token>` and the content type. Keep this scoped token private. It expires after one hour and is consumed when the file becomes ready. After an interrupted transfer, read the stable file ID before starting again; a pending upload can be resumed with its `file_id` and metadata. A ready file cannot be overwritten.

Each workspace has 1 GB shared by uploads and generated outputs. Images are capped at 20 MiB, audio/documents at 50 MiB, and videos at 250 MiB. Supported types: PNG, JPEG, WebP, GIF, MP4, WebM, MP3, WAV, OGG, M4A, PDF, DOCX, XLSX, PPTX, JSON, CSV and text. File size and declared type are checked during transfer.

Uploads cost no wallet funds. Pending transfers reserve space until completed, deleted or expired and cleaned up. `storage_full` means remove files you no longer need before retrying; nothing is automatically deleted. Reuse already-hosted files with `get_files` instead of importing another copy.

HTTP: `POST /v1/files/uploads`, then `PUT /v1/files/:id/content`. Bytes stream through the API to private storage, bypassing the website server. The workspace [Files page](https://scrollport.com/files) provides preview, download, upload and deletion.