SLang represents uploaded and stored files with theDocumentation Index
Fetch the complete documentation index at: https://docs.withsutro.com/llms.txt
Use this file to discover all available pages before exploring further.
FILE type. A FILE value carries file metadata and can be streamed, stored, downloaded, or passed to modules such as AI.prompt.
Upload and Store a File
HTTP file uploads are exposed through@request.files.<fieldName>. Use store fileValue to persist the upload to Sutro object storage before saving it on an entity.
multipart/form-data with a file field matching the trigger binding. In the example above, the field name is file.
What store Returns
store accepts a FILE and returns a persisted FILE. The stored value keeps the original file name, MIME type, size, and a Sutro storage location. Persisted FILE values can be saved on entities and later used in actions.
Use store when the file must survive after the current request. If an action only needs to process the upload immediately, it can pass the request file directly to another function or module without storing it first.
File Fields
UseFILE fields for documents, images, PDFs, CSVs, or any uploaded blob that should be attached to an entity.
FILE values are especially useful with:
- Document upload workflows.
- AI prompts with
attachments := [document.file]. - Audit records that need to retain source files.
- Imported data pipelines where a queue processes an uploaded file later.
Upload Limits
Generated app HTTP routes accept multipart uploads for trigger arguments bound from@request.files. The local and generated runtimes enforce upload limits before the SLang action runs, so oversized uploads fail at the HTTP layer.