Skip to content

Commit

Permalink
Merge pull request #83 from meilixie/js-sdk-upload-cancel
Browse files Browse the repository at this point in the history
when file upload success then ajax a new token
  • Loading branch information
SunLn committed Aug 27, 2015
2 parents 7e2379b + 50f1d0c commit a8917b6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion demo/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,16 @@ $(function() {
},
'FileUploaded': function(up, file, info) {
var progress = new FileProgress(file, 'fsUploadProgress');
progress.setComplete(up, info);

$.ajax('./uptoken',{
async: false
}).done(function(data){
$.extend(info, data);
progress.setComplete(up, info);
}).error(function(){
console.log('获取下载token失败');
});

},
'Error': function(up, err, errTip) {
$('table').show();
Expand Down

0 comments on commit a8917b6

Please sign in to comment.