0
我正在使用uploadifive上傳我的文件。我在上傳只有ppt文件時遇到問題,而在fileType中指定的其他文件已上載。出了什麼問題? 這裏是我的代碼即使在指定MIME類型後,也無法上傳.ppt文件
$(function() {
$('#file_upload').uploadifive({
'fileSizeLimit' : 5000,
'fileType' : [
'image/jpeg',
'image/png',
'application/pdf',
'text/csv',
'text/plain',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.ms-excel',
'application/vnd.ms-powerpoint',
'application/mspowerpoint',
'application/x-mspowerpoint',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/msword',
'application/csv',
'application/excel'
],
'uploadScript' : '{{url('file/uploads')}}',
'formData' : {
'_token' : '{{csrf_token()}}'
},
'onInit': addFiles
});
});
即使PPT MIME類型指定我得到一個錯誤,這不是accepted.Here是錯誤的截圖。
該文件的瀏覽器是什麼MIME類型? http://stackoverflow.com/questions/18299806/how-to-check-file-mime-type-with-javascript-before-upload – Quentin
另一個可能的問題是服務器確實知道該文件,不想服務它? –
@DanielCheung有可能嗎? – Raaz