ebs.upload
Uploads a file to the specified upload folder.
HINT
You may want to configure File Type Upload Control and/or File Upload Malware Scanning to make sure that the files you upload are the correct type and malware free.
You may want to configure File Type Upload Control and/or File Upload Malware Scanning to make sure that the files you upload are the correct type and malware free.
Syntax
Copy
ebs.upload(fileContentBase64: string, options: string | IEbsUploadOptions, callback: any, errorCallback: any): void
| Parameter | Description |
|---|---|
fileContentBase64
|
The base64 encoded representation of the file to be uploaded. |
|
|
Additional parameters, such as:
|
NOTE
- In order to upload a file to a specific upload folder, first you need to define that folder. To do so, update EbsMetadata.Entity by creating the new upload folder. The newly defined folder will be a sub-folder of the file upload location.
- If you do not specify the uploadLocation, the file is uploaded by default in the file upload location.
- Always include the "entity/" string in the uploadLocation syntax; otherwise, the system will try to upload the file to a KnownUploadFolder registered with the system.
Response
The response indicates the result of the code execution, depending on the endpoint's function.
Examples
In this example:
- We create the folder "MyUploadFolder".
- We upload the file “myFileName.ext” to the folder “MyUploadFolder”.
Request
Copy
update EbsMetadata.Entity
set UploadFolder = 'MyUploadFolder'
where Name = 'myEntityName'
ebs.upload("base64string", {
fileName: "myFileName.ext",
uploadLocation: "entity/myEntityName"
},
null, null);