yongtiger/js-ajaxfileupload

Installs: 258

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Language:JavaScript

Type:js

1.0.0 2017-02-12 21:36 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:31:23 UTC


README

Improved carlcarl/AjaxFileUpload and fixed some bugs.

Latest Stable Version Total Downloads Latest Unstable Version License

Features

  • add handleError
  • add start and beforeSend local callbacks of events
  • fix ie9 and ie 10
  • fix bugs: confict with yii.js(350)

Example:

ajaxFileUpload: function () {
    $.ajaxFileUpload({
        url: '<your url>',      // MUST! 
        secureuri: false,       // MUST!
        fileElementId:'<your file element id>', // MUST!
        type: 'post',           // MUST!
        data: '<your data>',    // MUST!
        dataType: 'json',       // MUST! `json`, `xml`, etc.

        // optional
        start: function () {
            // ...
        },

        // optional
        beforeSend: function () {
            // ...
        },

        // optional
        success: function (data, status) {
            // ...
        },

        // optional
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            // ...
        },

        // optional
        complete: function () {
            // ...
        }
    });
},

References

See also

License

ajaxfileupload is released under the MIT license, see LICENSE file for details.