from mimetypes import MimeTypes
mime = MimeTypes() mime_type = mime.guess_type('C:\SomePath\hangle.hwp')
print mime_type
If you obtain the mine-type of the Korean document from the code above and print out the result, (None, None) is printed out Is there any way to get hwpmine-type?
python2.7
You can register the mime type.
If it's Unix or Linux, you can look at the /etc/mime.types or Apache memetype file.
If it is Windows, search in the registry.
Put it under HKEY_CLASSES_ROOT like extensions.
You can put about application/x-hwp in the content type.
© 2024 OneMinuteCode. All rights reserved.