How to check if the uploading file format is different with the file name extension in Python

I want to check the uploading file format is different with the file name extension without saving the file.

I tried magic library

Back to Top