Follow the tutorial:
[YOUTUBE TUTORIAL]
This widget has the following inputs:
FileType (Text) - List of accepted file types (Eg. "image/*,.pdf"). Please find more details here.
MaxFileSize (Long Integer) - Maximum file size in bytes (eg. 1 MB = 1,048,576 B). Files larger than this will be ignored and the OnFileUploadError event will be triggered. All other files will still be uploaded.
MaxNumberOfFiles (Integer)- Number of files that can be uploaded at once. The input 0 (zero) will be ignored; instead use the input IsEnabled to enable or disable uploading files. Please be aware that the user can upload some files and after the upload is done, upload some more by clicking on the widget again. The MaxNumberOfFiles limit only takes into consideration one upload session at a time. If you want to limit the number of files overall, please use the IsEnabled input in conjunction with a count on your side.
IsEnabled (Boolean) - Controls if the input accepts files or not. True if the input should be enabled, False otherwise.
This widget has the following events:
OnUploadStart - Triggered when the files start to be uploaded. You can use this event to enable animations.
OnFileUpload - Triggered when a file as been uploaded. The event as the following inputs
FileName (Text) - Name of the file uploaded by the user (Eg. "footer-icon-instagram.png");
FileSize (Long Integer) - Size of the uploaded file in bytes;
FileMimeType (Text) - Type of the file. (Eg. "image/jpeg");
FileBinaryData (Binary Data) - Uploaded file;
NumberOfFilesToUpload (Integer) - Total number of files uploaded by the user. You can use this value to know if all the files have been uploaded and disable some type of loading animation;
OnFileUploadError- Triggered when there is an error uploading a file. The rest of the files will still be uploaded. This event has the following inputs:
GenericErrorMessage (Text) - Message regarding the type of error. (Eg. "The file is too large" or "Uploading files is disabled");
To help you use this component we developed a loading animation widget called LoadingAnimation. If you need you can enable the animation via its only input IsLoading.