Krajee Bootstrap File Input, catching AJAX success response

前端 未结 5 2077
无人共我
无人共我 2021-02-08 04:21

I\'m using Krajee the Bootstrap File Input plugin to perform an upload via AJAX call.

Here is the link to the Krajee plugin AJAX section: Krajee plugin AJAX

The

5条回答
  •  一向
    一向 (楼主)
    2021-02-08 04:43

    You can read the events section on the plugin documentation page to understand the various events provided by the plugin.

    It depends on how you have setup the ajax upload in the plugin. The plugin offers two ajax upload modes - synchronous and asynchronous as described in the documentation. Its asynchronous if you have uploadAsync property set to true.

    FOR AJAX SUCCESS TRAP:

    • you can use the filebatchuploadsuccess event for synchronous uploads
    • you can use fileuploaded event for asynchronous uploads

    FOR AJAX ERROR TRAP:

    • you can use the filebatchuploaderror event for synchronous uploads
    • you can use fileuploaderror event for asynchronous uploads

    In your case you have set uploadAsync set to true - so use the asynchronous settings/events.

提交回复
热议问题