aws_s3, gcs or azure_blob_storage. The optional base_path keeps all of the app’s files under one prefix of the bucket.
Uploading
- Console
- API
Open the datasource and use Upload File. Enter the path to store it under, or leave it empty to use the file’s name.
pathis the key relative tobase_path. A path ending in/(or no path) stores the file under that folder with its own name.- An existing file at the same path is replaced.
- The response’s
path, adatasource://<datasource-id>/<key>reference, is what you keep: store it in your table rows and pass it to workflows. It names the datasource as well as the file, so it stays meaningful when an app has several stores.
Files whose type a browser could execute (HTML, SVG, XML and similar) are stored as
application/octet-stream, so they download instead of rendering. Images, PDFs, video and ordinary documents keep their type.Downloading
path can be the datasource:// reference or the key relative to base_path. A datasource:// reference that names a different datasource is refused.
In a browser application, fetch the file with the user’s token and display it from a blob: URL; there is no public link to hand to an <img> tag. Allow blob: in your Content-Security-Policy for images and media.
In workflows
Thedatasource_download_file node loads a file by its reference. Images and videos come out as media that an agent selecting the node sees; other files come out as text or base64. See Images, documents and video.
Pattern: keep references in your records
- Your application uploads each file and gets its
datasource://reference. - It saves the record, with the references, through the datasource API.
- A workflow loads the record with a dynamic query, and downloads exactly the files each agent needs.

