ftos.files.upload

IMPORTANT!  
Starting with v24.3.0, this is renamed from uploadFile to ftos.files.upload.

Saves an encoded file to the default upload folder or to a known folder. The file can be structured file object with metadata, raw binary data, or path, URL, or encoded content. base64 is also used.

This is a business logic method for business service components.

Syntax

Copy
function ftos.files.upload(options : IEbsUploadFileOptions, file: any): FileUploadInfo
 
Parameter Type Description
options IEbsUploadFileOptions Name and location of the file to be uploaded.
FileUploadInfo string Contents of the file encoded. It can be string, WorkflowBlob, Uint8Array.

Interface

Return Value

Returns a JSON object detailing the file upload with the following structure:

Copy
{
    "Name": "backup.pdf",
    "RealName": "backup_65d697c9-ab55-4737-a720-79c031867cc1.pdf",
    "IsSuccess": true,
    "Message": null,
    "ClientScript": null,
    "Serialized": null,
    "ErrorCode": 0,
    "UIResult": null
}

Examples