Actions26
- Item Actions
- User Actions
- File Actions
File → Update (Raw JSON)
AI-generatedSummary
Updates a Directus file by sending a raw JSON payload to the API.
Inputs
- fileId (required) — The ID of the file to update. Must be provided for each item processed.
- jsonData — Raw JSON data to send to Directus as the request body. If omitted, an empty payload is sent.
Output shape
For each input item, returns an object with a json field containing either the parsed Directus response (or raw string) and a pairedItem reference to the input index. If continueOnFail is enabled and an error occurs, the json field contains { error: <message> }.
When the node‑level 'Simplify' option is enabled, the returned file object is simplified using the node's
simplifyFilehelper.
Examples
Example 1: Update a file's metadata with custom fields
Set File ID to {{$json[“fileId”]}} and JSON Data to {{ { “custom_metadata”: { “tags”: [“logo”, “brand”] } } }}. The node PATCHes /files/:id with the supplied JSON and returns the updated file record.