Discussion

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.

2 points deca6cda37d0 6 years ago 4 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton