cancel in prebatch option of upload widget kills widget
EXPERIENCE: using a preBatch function in the options of the upload widget:
- calling the callback provided (an ugly anti-pattern btw) with {cancel: true} effectively kills the widget.
- no notifications are emitted.
- widget container body is emptied.
- [Done] button remains disabled.
- returning w/out calling the callback yields the same behavior
EXPECTED BEHAVIOR:
- upload batch is canceled.
- selected/cropped/etc files remain in queue.
- widget remains actionable.
-
Hi Steeve Knight,
I was able to test the preBatch function in the options of the Upload Widget with cancel: true in the callback and do not see any issue.
Here is the code: https://jsfiddle.net/bdvkf795/
See if this helps or else share a sample of your code snippet for debugging.
Best regards,
Jay0 -
Yep, same result. "empty", un-actionable widget following cb({cancel: true})
btw: am stuck on jQ 2.2.4 but result seems to be same
0 -
Hi Steeve,
I have reported this issue internally with the team and will post here when there is some update.
Best regards,
Jay0 -
Hi Steeve,
Just to let you know that the issue is fixed.
Best regards,
Mo0 -
Thx Mo,
Been a while since I've touched this - would there be any upgrade effort on my side?0 -
Hi Steeve,
If you're loading the Upload Widget source code by using https://widget.cloudinary.com/v2.0/global/all.js then you won't need to do any upgrades on your side as you'll be receiving the latest Upload Widget code automatically. You will only need to do any upgrades on your side if you have previously downloaded the Upload Widget source code and are hosting it locally yourself - such as if it's pinned to a specific version. If that is the case, then you will want to get the latest code from https://widget.cloudinary.com/v2.0/global/all.js and update your locally hosted file with that.
0
Post is closed for comments.
Comments
6 comments