Skip to main content

Upload Widget preBatch error

Comments

2 comments

  • Official comment
    Stephen Doyle

    Hi Michalis,

    As an update - the widget has been updated and it now should work as originally documented, without the empty object in the callback as a workaround. 

    Can you please let me know if you're still seeing issues?

    Regards,
    Stephen

  • Stephen Doyle

    Hi Michalis,

    Thanks for bringing this to my attention; it appears there's a mistake in the example in the documentation. I'll ask the documentation team to look into that.

    The problem with your code is that cb() function can't be called with no parameters.
    For the case where you want to allow the upload to proceed without canceling it, you must pass an empty object as a parameter, e.g. cb('{}');

    For example, this should work:

    preBatch: (cb, data) => {
       console.log(data);
       cb({});
    }


    Please give it a try and let me know if that solves your issue

    0

Post is closed for comments.