File Upload Validation
Moderator: General Moderators
- The_Anomaly
- Forum Contributor
- Posts: 196
- Joined: Fri Aug 08, 2008 4:56 pm
- Location: Tirana, Albania
File Upload Validation
I'm working on an Intranet site where the users are permitted to upload Microsoft Office files and PDFs. If the Mime-Type is unreliable, then how can I verify that these files are, in fact, legit? If they were images, I'd attempt to open them with a GD function, to test if they are truly images--but I'm not sure what I can do with other types.
Re: File Upload Validation
There is a console application called pdfinfo. The manpage looks very promising
I Think it's part of xpdf.