最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Jquery file upload plugin how to fetch Response sent from server - Stack Overflow

programmeradmin0浏览0评论

i am using jquery file upload plugin provided at now the problem is that i am returning image paths for the matching images that i just uploaded if following format.

["upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg"]

now i cant figure out that how can i fetch this reponse. I mean usually ajax response can be fetched within success function but i cant figure out where is similar function in the following uploader.

i am using jquery file upload plugin provided at https://github.com/blueimp/jQuery-File-Upload now the problem is that i am returning image paths for the matching images that i just uploaded if following format.

["upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg","upload\/2014-04-08-17-04-39000000_d.jpg"]

now i cant figure out that how can i fetch this reponse. I mean usually ajax response can be fetched within success function but i cant figure out where is similar function in the following uploader.

Share Improve this question edited Apr 8, 2014 at 16:03 noobie-php asked Apr 8, 2014 at 15:42 noobie-phpnoobie-php 7,22315 gold badges59 silver badges106 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 18

In fileupload.js there is a call back function done. Use this code.

done: function(e, data) {
                var r = data.result;
                alert(r);
            },

Did you try binding: .bind('fileuploaddone', function (e, data) {/* ... */}) ?

That should be the callback you are looking for.

发布评论

评论列表(0)

  1. 暂无评论