must be a file of type:application/pdf
Hey guys, i have this code in my form:
i upload a pdf file but int the front return me an error
"Documentos de respaldo field must be a file of type: application/pdf."
any idea about this error?
10 Replies
Does anyone know anything about it, I can't understand why this problem exists, it doesn't really make much sense.
Check the actual mime type of the file.
Some apps might create files with a different mime type
thank for your answer bro... The file in tmp folder is .bin, i don't know why!
here i only upload the file, when i save i received the error
Hm. I think I have seen others claiming that FilePond converts files/uploads files with the wrong extension
If you check the mime type before uploading what's the result?
wel i update my code and add this line
and it working, how ever if i add this line
from the documentation, return me the error
https://filamentphp.com/docs/3.x/forms/fields/file-upload#file-type-validation
The first one are the Laravel rules which work on the backend. And I guess
pdf
is broader checking then application/pdf
. The other rule should be used by Filepond on the frontend.Filepond? is not the same like Fileupload?
FileUpload uses FilePond under the hood
Ok, bro, thank you so much for the answer and explanation