i

Please enable JavaScript to view this site.

Documentation 8.7

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.
 
Parameters

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:

 
   $d.selectFile((event, files, input) => {

      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:

 
  $d.uploadFile(files[0], (result, error) => {

        console.log(result);

    }, "FORM");

 

Send us your comments
Share on X Share on Linkedin Send by Email Print