我对精细上传器的端点有疑问,它拒绝点击api控制器。拖放后,它将直接进入onSubmitted,但不使用端点。请协助我所缺少的。
var galleryUploader = new qq.FineUploader({
element: document.getElementById("fine-uploader-gallery"),
template: 'qq-template-gallery',
autoUpload: false,
request: {
endpoint: '/api/student/uploads/',
params: {
StudentNumber: StudentNumber
}
},
thumbnails: {
placeholders: {
waitingPath: '/node_modules/fine-uploader/fine-uploader/placeholders/waiting-generic.png',
notAvailablePath: '/node_modules/fine-uploader/fine-uploader/placeholders/not_available-generic.png'
}
},
validation: {
itemLimit: 2,
allowedExtensions: ['jpeg', 'jpg', 'gif', 'png','pdf']
},
uploadSuccess: {
},
callbacks: {
onSubmitted: function (id, name) {
debugger;
},
onError: function (id, name, errorReason, xhrOrXdr) {
debugger;
},
onUpload: function (id, name, isError, responseJSON) {
debugger;
},
onComplete: function (id, fileId, responseJSON) {
debugger;
}
},
retry: { enableAuto: false }
});
//下面是我的api控制器
[HttpPost]
[Route("api/student/uploads")]
public async Task<object> UploadDoc(int StudentNumber)
{
// needs to come here
}