>>> mimetypes.guess_type(\'picture.jpg\') (\'image/jpeg\', None)
Now I have a file-like object, (eg. stingIO), which content is image\'s d
>>> import mimetypes >>> print(mimetypes.MimeTypes().guess_type('my_file.txt')[0]) text/plain
Reference : https://www.tutorialspoint.com/How-to-find-the-mime-type-of-a-file-in-Python