I have a problem such that i have zip files uploaded from forms and i want to detect the mime type of the files that contained in these zip files,i have no problem in extracting the files from the zip but the problem how to know the mime type of each file in this zip?Thanks
Share
You can use the Python built-in
mimetypesmodule for this. I believe this module relies solely on the file name and not its contents.