Stage Runtime file

View as Markdown

Copy a durable File into an active Runtime workspace. Staging creates a copy; it does not move or delete the durable File.

Stage a File

1const result = await bctrl.tools.call("runtime.files.stage", {
2 fileId: file.id,
3 path: "reports/input.csv",
4}, { runtimeId: runtime.id });
5
6console.log(result.path, result.size);

The Runtime must be active. path is relative to the workspace root; absolute paths and .. segments are not allowed.

Request parameters

ParameterTypeRequiredDescription
fileIdFileIdYesDurable File to copy.
pathstringYesWorkspace-relative destination path, from 1 to 1024 characters.

Response

FieldTypeAlways presentDescription
fileIdFileIdYesDurable File that was staged.
pathstringYesWorkspace-relative destination path.
sizenumberYesNumber of bytes staged.

Next