Dropzone Accepted Files Issue
Asked Answered
I

2

5

I have set Dropzone to only allow PDfs

acceptedFiles: "application/pdf"

However whenever I upload a PDF it throws an error. In the response it is stating that the file I tried uploading was an unkown file type.

type: "unknown/data"

I am not sure how to handle this or fix it. I have tried multiple PDF files from all different sources.

Incoming answered 9/7, 2016 at 1:26 Comment(1)
Could you share some more code or even a working fiddle?Baksheesh
M
11

try this...

acceptedFiles: ".pdf"
Mcauliffe answered 14/7, 2016 at 7:28 Comment(0)
A
4

try this:

maxFiles: 5,

maxFilesize: 20,

acceptedFiles: "image/*,application/pdf,.doc,.docx,.xls,.xlsx,.csv,.tsv,.ppt,.pptx,.pages,.odt,.rtf",
Alizaalizarin answered 20/3, 2020 at 16:11 Comment(2)
Are the first two lines important? If so what effect do they have on the question? How will the third line help to solve the problem? "Try this" answers need to explain how and why the person proposing them thinks it will help, otherwise they are comments and not answers.Gley
No, first two lines are not important.Alizaalizarin

© 2022 - 2024 — McMap. All rights reserved.