我正在使用fineuploader为我的联系表单上传图片和pdf文件。但是当我尝试上传pdf文件时,即使我将pdf扩展添加到allowedExtensions数组,也会导致未知的错误异常。 图片上传没有问题。
这是我的配置代码:
var DEFAULT_CONFIG = {
autoUpload: true,
cors: {
expected: true,
},
maxConnections: 2,
element: document.getElementById('fine-uploader'),
request: {
endpoint: SERVICE_ENDPOINT,
forceMultipart: false,
params: SERVICE_PARAMS,
},
validation: {
sizeLimit: 1024 * 1024 * 50,
allowedExtensions:["bmp","gif","jpg","jpeg",
"pcx","png","tga","tiff", "tif", "doc", "docx", "pdf"],
},
workarounds: {
iosEmptyVideos: false,
}
};