-
Notifications
You must be signed in to change notification settings - Fork 0
/
mime.py
24 lines (24 loc) · 1.04 KB
/
mime.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import mimetypes
def add_mime_types():
mimetypes.add_type('image/jpeg', '.jpeg')
mimetypes.add_type('image/jpeg', '.jpg')
mimetypes.add_type('image/png', '.png')
mimetypes.add_type('image/gif', '.gif')
mimetypes.add_type('image/webp', '.webp')
mimetypes.add_type('image/avif', '.avif')
mimetypes.add_type('video/mp4', '.mp4')
mimetypes.add_type('video/mpeg', '.mpeg')
mimetypes.add_type('video/x-msvideo', '.avi')
mimetypes.add_type('video/x-ms-wmv', '.wmv')
mimetypes.add_type('video/quicktime', '.mov')
mimetypes.add_type('video/webm', '.webm')
mimetypes.add_type('video/x-flv', '.flv')
mimetypes.add_type('audio/mpeg', '.mp3')
mimetypes.add_type('audio/x-wav', '.wav')
mimetypes.add_type('audio/ogg', '.ogg')
mimetypes.add_type('audio/x-flac', '.flac')
mimetypes.add_type('audio/aac', '.aac')
mimetypes.add_type('audio/x-ms-wma', '.wma')
mimetypes.add_type('audio/x-m4a', '.m4a')
mimetypes.add_type('text/plain', '.txt')
mimetypes.add_type('application/json', '.json')