How to access fineuploader parameters onComplete f

2019-02-20 09:48发布

问题:

   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?

    }
  });

回答1:

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.