getFileBlob
Returns a pointer to a stored file.
Syntax
Copy
function getFileBlob(fileName : string): IFtosWorkflowBlob;
| Parameter | Type | Description |
|---|---|---|
fileName
|
String | Unique internal ID of the source file (real name) including the file extension. |
Return Value
Returns a IFtosWorkflowBlob blob object containing a "length" property that indicates the file's size in bytes.
Type Aliases
Copy
{
readonly length : number;
toBase64(): string;
toStream(): any;
}
| Property | Type | Description |
|---|---|---|
length
|
number | File's size in bytes. |
Methods
Returns a base64 encoded string representing the file's content. This is equivalent to using the downloadFile function, provided that the current user has access rights to the file.
Not intended for developer use.
Examples
In this example:
- We get the Length of the contract_df7022c8-4fb3-4353-9fa8-bb2514e3a6ea.pdf file.
- We store the file size in a variable called size.
Copy
var size = getFileBlob('contract_df7022c8-4fb3-4353-9fa8-bb2514e3a6ea.pdf').length;