eLabSDK.Experiment.Section.File
Functions
Name | Description |
---|---|
getFiles() | Add Files to the section |
addImportButtons(callback, actionName, btnContent) | Add "Add x File" buttons next to the "Add File" button on all file sections in the experiment |
Create a button on every file section in the experiment
Allow to add files from a file source
uploadFiles(fromSections, files) | Allow to upload file to the server (remote / local)
_handleLocalStorageFileUploaded(section, filename, obj) | Finalize the upload on local server
_onLocalStorageUploadError(filename, message) | Display the errors that happens when we upload on the local server
getFiles()
Add Files to the section
Kind: global function
Returns: array
- eLabSDK.ExperimentFile
addImportButtons(callback, actionName, btnContent)
Add "Add x File" buttons next to the "Add File" button on all file sections in the experiment
Create a button on every file section in the experiment
Allow to add files from a file source
Kind: global function
Param | Type | Description |
---|---|---|
callback | callback | : function to call once the import button has been clicked |
actionName | string | : name of the action |
btnContent | string | : html file content |
uploadFiles(fromSections, files)
Allow to upload file to the server (remote / local)
Kind: global function
Param | Type | Description |
---|---|---|
fromSections | string | : section ID which specify to which section you want to add the file(s). |
files | string | : List of files to upload |
_handleLocalStorageFileUploaded(section, filename, obj)
Finalize the upload on local server
Kind: global function
Param | Type | Description |
---|---|---|
section | Experiment.Section | : section we want to add the file(s) to. |
filename | string | : List of files to upload |
obj | struct | : File upload info |
_onLocalStorageUploadError(filename, message)
Display the errors that happens when we upload on the local server
Kind: global function
Param | Type | Description |
---|---|---|
filename | string | : file name |
message | string | : error message |
© 2023 eLabNext
Updated 10 months ago