Upload widget - file is too large.
Hi All. I'm using https://cloudinary.com/documentation/upload_widget , how can I handle situation when user tries to add a file what bigger than maxFileSize? I want to close widget in this situation. Can't find any event(https://cloudinary.com/documentation/upload_widget#api_events) related to this ... please advise. And a second question when cloudinary.createUploadWidget returns error? Thank you.
-
Hi, I just replied to your support ticket with the same question, but to quickly summarise for others:
The upload widget will fire several events for each upload, and the upload-added event contains the details of the selected file including its file size.
While I wouldn't recommend closing the widget the event callback in case it's still performing an operation, you could hide it when the user selects a file that's too large, and show them your own error message.
Thanks!
Stephen
0
Post is closed for comments.
Comments
1 comment