Uploading and Downloading Files
Laminar provides mechanisms for handling binary data (files) within your workflows, particularly in conjunction with HTTP requests and shell scripts.
When an http request (using lam.httpRequest) results in a file download, Laminar automatically stores the file and provides a binaryDataId in the step's response.
{
"lam.httpStatusCode": 200,
"lam.httpStatusText": "OK",
"lam.success": true,
"lam.binaryDataIndicator": true,
"lam.contentType": "application/zip",
"lam.fileName": "fileName",
"lam.contentLength": 625,
"lam.binaryDataId": "binaryId"
}
You can access this ID via data.step_N.response['lam.binaryDataId'].
Processing files in script:
To process a downloaded file (or any binary data referenced by a binaryDataId) within a lam.shell script, you must include the binaryDataIds array in your lam.shell definition.
Laminar will make these files available to your shell script in its execution environment.
Example Workflow:
Last updated
Was this helpful?