i
File Usage
Access methods are used to retrieve items or access specific functionalities.
Access Method
Name |
Description |
Result |
---|---|---|
$d.selectFile(callback, accept) |
It allows selecting files. When executed, the file explorer opens so the user can choose one or more files. •Function callback: Function to be executed upon completion of the operation •String accept: Type of file that will be allowed to be selected. If null or undefined is sent, it is assumed that all file types are accepted Example: console.log(files[0]); }, 'image/png') |
- |
$d.uploadFile(file, callback, objectType) |
Allows uploading a file to Deyel.
Parameters •File file: Javascript Object that represents a file •Function callback: Function to be executed upon completion of the operation •String objectType: Destination type of object in Deyel. Example, “FORM” | “RULE”.
Example: console.log(result); }, "FORM"); |
|