我已经浏览了 FineUploader 文档,但是当我像下面这样设置上传按钮文本时,更改似乎没有传播。上传按钮仍显示默认文本。我错过了什么?
var manualuploader = new qq.FileUploader({
element: document.getElementById('manual-fine-uploader'),
text: {
uploadButton: "Select a File" // <========== Setting text here
},
action: "/file/upload",
autoUpload: false,
multiple: false,
forceMultipart: true,
onComplete: function (id, fileName, json) {
$("#divFileUploadLoading").hide();
$("#buttonUploadFile").show();
if (json.success) {
displaySuccessMessage("Successfully uploaded: " + fileName);
$("#textFileTitle").val("");
$("#textFileDescription").val("");
$("#checkIsDownloadable").prop("checked", true);
$("#checkDisplayDetails").prop("checked", true);
}
else {
displayErrorMessage("Failed to upload: " + fileName + " because '" + json.errorMessage + "'");
}
g_FileCount = 0;
manualuploader.clearStoredFiles();
manualuploader.reset();
},
onSubmit: function (id, fileName) {
g_FileCount++;
},
onCancel: function (id, fileName) {
$("#divFileUploadLoading").hide();
$("#buttonUploadFile").show();
displaySuccessMessage("Canceled upload for: " + fileName);
g_FileCount--;
}
});