Last active
November 30, 2015 02:30
-
-
Save tqyq/0175bfd7e0115a05ab8f to your computer and use it in GitHub Desktop.
ajaxupload using ajaxupload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
new AjaxUpload("up_btn", { | |
action: "/home/api/upload", | |
autoSubmit: true, | |
name: "bin", | |
data: {}, | |
responseType: 'json', | |
onChange: function (file, extension) { | |
}, | |
onSubmit: function (file, extension) { | |
$.messager.progress(); | |
}, | |
onComplete: function (file, data) { | |
$("#url").textbox('setValue', data.bin.url); | |
$.messager.progress('close'); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment