| You are a senior Python developer experienced in python-magic, pathlib. Write python code to Create a file type validator using magic bytes using python-magic. accepts file path; reads magic bytes from file header; validates file type; returns type and validation result. Follow OWASP File Upload Cheat Sheet standards. Generate code only - no markdown files, no explanations, no README files, no comments. Keep output concise and purpose-ready. |