eLabSDK.Experiment.Section.File

Functions

NameDescription
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

ParamTypeDescription
callbackcallback: function to call once the import button has been clicked
actionNamestring: name of the action
btnContentstring: html file content

uploadFiles(fromSections, files)

Allow to upload file to the server (remote / local)

Kind: global function

ParamTypeDescription
fromSectionsstring: section ID which specify to which section you want to add the file(s).
filesstring: List of files to upload

_handleLocalStorageFileUploaded(section, filename, obj)

Finalize the upload on local server

Kind: global function

ParamTypeDescription
sectionExperiment.Section: section we want to add the file(s) to.
filenamestring: List of files to upload
objstruct: File upload info

_onLocalStorageUploadError(filename, message)

Display the errors that happens when we upload on the local server

Kind: global function

ParamTypeDescription
filenamestring: file name
messagestring: error message

© 2023 eLabNext