File references
ACE introduces file references as a convenient abstraction layer for propagating files through flows.
Overview
Files uploaded in ACE produce IDs known as file references. The file reference can be used to reference the file in other steps.
For example, the REST HTTP Step can recognize a file reference passed as a File field, resolve it and send it as a form field in a multipart/form-data
REST request.
File reference lifetime
File references are valid for the duration of the API request calling the flow. The file and file reference will live as long as the operation, and be terminated as soon as the operation terminates.
Storing the ID and referencing it in the context of a separate API request is not supported.
File reference content type detection
Files uploaded to ACE will go throught signature checks and will try to provide detectedExtension
and detectedMimeType
fields in returned file reference
object.
For example, a file downloaded using REST step will return file reference
inside the document:
{
"id": "c619a88b-deac-43d7-98fa-9e582b771f56",
"contentType": "image/png",
"size": 2589872,
"extension": ".png",
"fileName": "i-am-picture.png",
"detectedExtension": "exe",
"detectedMimeType": "application/x-msdownload"
}
Note that extension
, contentType
are provided from headers or execution context, but in this case actual file was detected as executable windows file.
This can be used to validate files during flow execution. ACE doesn't enforce in any means, for example, for extension
to match detectedExtension
, so its up to the user to decided if such fields are useful in flow development.
Possible values for detectedExtension
and detectedMimeType
can be seen here.
In case a text file is handled, detection will return empty string as it only works for binary/complex files.