【发布时间】:2014-11-22 02:54:13
【问题描述】:
我正在尝试将一个额外的参数传递给 blueimp 文件上传。我尝试使用文件上传提交事件:
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
// The example input, doesn't have to be part of the upload form:
var input = $('#input');
data.formData = {example: input.val()};
if (!data.formData.example) {
data.context.find('button').prop('disabled', false);
input.focus();
return false;
}
});
但是我不知道那个额外的参数被传递到哪里以及如何访问那个额外的参数?
我想要实现的是在 UI 版本中上传文件时为每一行分配一个唯一的 ID。有什么建议吗?
【问题讨论】:
标签: javascript jquery forms file-upload blueimp