How to find the mime type of a file in python?

前端 未结 19 1158
猫巷女王i
猫巷女王i 2020-11-22 15:19

Let\'s say you want to save a bunch of files somewhere, for instance in BLOBs. Let\'s say you want to dish these files out via a web page and have the client automatically o

19条回答
  •  無奈伤痛
    2020-11-22 15:55

    The mimetypes module just recognise an file type based on file extension. If you will try to recover a file type of a file without extension, the mimetypes will not works.

提交回复
热议问题