jQuery UI Widgets Forums Editors FileUpload How to tell if a file did NOT get uploaded?

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 8 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • jbpd

    I know there’s a way using UploadEnd to tell when the upload is complete, but how do I tell if the file did NOT get uploaded or fails within a set amount of time? We have big latency issues on our network and having that knowledge that it failed would really help.



    Hello jbpd,

    The uploadEnd event can be used in both cases. It returns the server response as an argument:

    $('#jqxFileUpload').on('uploadEnd', function (event) {
        var args = event.args;
        var fileName = args.file;
        var serverResponce = args.response;
        // Your code here.

    If the upload has failed, you should echo a “failed upload” message from your server-side and this message will be received client-side as the response argument. You can take a look at our sample image uploading PHP script (found in the API Documentation, under uploadUrl) where you can see how different messages can be echoed from the server depending on whether the upload has been successful or not.

    Best Regards,

    jQWidgets team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.