Upload - Code
Basic
API for ix-upload
Properties
The accept attribute specifies the types of files that the server accepts (that can be submitted through a file upload).
acceptstring | undefinedIf directoryUpload is true the user can drop or select a folder containing one or more files
directory-uploadbooleanfalseDisable all input events
disabledbooleanfalseText for disabled state
i18n-upload-disabledstring'File upload currently not possible.'Label for upload file or folder button
i18n-upload-filestring | undefinedWill be used by state = UploadFileState.LOADING
loading-textstring | undefinedWhether the text should wrap to more than one line
multilinebooleanfalseIf multiple is true the user can drop or select multiple files
multiplebooleanfalseWill be used by state = UploadFileState.SELECT_FILE
select-file-textstring | undefinedAfter a file is uploaded you can set the upload component to a defined state
stateUploadFileState.LOADING | UploadFileState.SELECT_FILE | UploadFileState.UPLOAD_FAILED | UploadFileState.UPLOAD_SUCCESSEDUploadFileState.SELECT_FILEWill be used by state = UploadFileState.UPLOAD_FAILED
upload-failed-textstring'Upload failed. Please try again.'Will be used by state = UploadFileState.UPLOAD_SUCCESSED
upload-success-textstring'Upload successful'Methods
Events
You get an array of Files after drop-action or browse action is finished
filesChangedFile[]