From 43ed5945ded8c0c60a47ac94b30e3d565f22c68d Mon Sep 17 00:00:00 2001 From: Lukortech <26508593+Lukortech@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:07:27 +0100 Subject: [PATCH] Update uploader.md onBeforeUpload event I've found some information scattered around the web about this UI element but the documentation doesn't mention this event and even more intruiguing is that it doesn't really work as I would expect it to. I should be able to validate files (like exceeded size, fileType) before even allowing user to click "upload" button. That's not the case and I've already got davin to write some code: https://github.com/box/box-ui-elements/pull/3841 --- content/guides/embed/ui-elements/uploader.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/guides/embed/ui-elements/uploader.md b/content/guides/embed/ui-elements/uploader.md index e8f6d33a5..f6ec65752 100644 --- a/content/guides/embed/ui-elements/uploader.md +++ b/content/guides/embed/ui-elements/uploader.md @@ -169,6 +169,7 @@ uploader.removeAllListeners(); | `complete` | `Array` | Will be fired when all uploads in the current view are complete. Event data will be an array of File Object. | | `upload` | File | Fired when a single file is successfully uploaded. Event data will be a File Object. | | `error` | Object | Fired when a single file has an upload error. Event data will be an object with properties file from the File Web API and the error object error. | +| `onBeforeUpload` | `Array` | Fired after user selected files to upload. Should allow for validation of said files but the return of `boolean` or `Array or Array or ''` doesn't seem to work.| ## Scopes