yongtiger/js-ajaxfileupload

安装: 202

依赖: 0

建议: 0

安全: 0

星星: 2

关注者: 2

分支: 1

开放问题: 0

语言:JavaScript

类型:js

1.0.0 2017-02-12 21:36 UTC

This package is not auto-updated.

Last update: 2024-09-28 20:25:25 UTC


README

改进了 carlcarl/AjaxFileUpload 并修复了一些错误。

Latest Stable Version Total Downloads Latest Unstable Version License

特性

  • 增加 handleError
  • 增加事件的 startbeforeSend 本地回调
  • 修复 ie9 和 ie 10
  • 修复错误:与 yii.js(350) 冲突

示例

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 () {
            // ...
        }
    });
},

参考

另请参阅

许可证

ajaxfileupload 采用 MIT 许可证发布,详情请见 LICENSE 文件。