.. _auto_workflow_replace_file: *REPLACE FILE IN A WORKFLOW* ============================ Replaces a specific file inside an existing workflow by its relative path, swapping it with a newly uploaded file. Use this worker when you need to update a workflow asset (e.g., a node definition or configuration file) without rebuilding the entire workflow. When to use ----------- Tagged: ``asset_management``, ``file_replace``, ``user``, ``workflow``. Inputs ------ .. list-table:: :header-rows: 1 :widths: 20 20 20 20 20 20 * - Label - ID - Type - Default - Required - Description * - Workflow - workflow_id - remote_lookup - — - ✓ - The target workflow in which the file replacement will occur; select from the remote lookup of available workflows (required, no default). * - Relative File Path to Replace in the Workflow - relative_file_path - text - — - ✓ - Relative path (from the workflow root) of the file to be replaced, e.g. nodes/node_file.json; must match the exact existing path within the workflow. * - New File - new_files - file - — - ✓ - The replacement file to upload; its contents will overwrite the file currently located at the specified relative path in the workflow. Outputs ------- .. list-table:: :header-rows: 1 :widths: 20 20 20 20 * - Label - ID - Type - Description * - Workflow - workflow_id - integer - Integer ID of the workflow in which the file replacement was performed, returned for downstream reference. * - Old File Size - old_file_size - integer - Size (in bytes) of the original file that was replaced, useful for audit or validation purposes. * - New File Size - new_file_size - integer - Size (in bytes) of the newly uploaded replacement file, allowing comparison against the old file size to confirm the swap. Disciplines ----------- - data.io.file - platform.workflow .. raw:: html
Auto-generated from platform schema. Worker id: workflow_replace_file. Schema hash: 4426fe178741. Hand-curated docs in workerexamples/ override this page when present.