如何访问onuplet函数中的fineuploader参数? [英] How to access fineuploader parameters onComplete function?

查看:66
本文介绍了如何访问onuplet函数中的fineuploader参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   manualuploader.fineUploader('setParams', {
        foo: bar
      });

  var manualuploader = $('#manual-fine-uploader').fineUploader({
    .
    .
    .

  })
  .on('submit', function(event, id, name) {
    .
    .

  }).on('complete', function(event, id, fileName, responseJSON) {

   // HOW CAN I ACCESS TO foo -parameter HERE?

    }
  });

推荐答案

responseJSON参数将包括服务器对上传请求的响应中返回的所有键和值. setParams函数用于将上传请求中的参数发送到您的服务器.如果出于某种原因,您想让这些相同的值可用于complete回调,只需将它们包含在服务器的响应中即可.

The responseJSON parameter will include any and all keys and values returned in your server's response to the upload request. The setParams function is used to send parameters in the upload request to your server. If, for some reason, you want to make these same values available to your complete callback, simply include them in your server's response.

这篇关于如何访问onuplet函数中的fineuploader参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆