1
Ask HN: What is the best way for validating files?
Users can upload files into my backend system. Other users can view those files in the client.
For example I only allow PDF files. What is the best way to validate that the file uploaded is indeed a PDF file. And not a otherfileformat.pdf? So the files uploaded will be rendered correctly. This is to prevent human errors.