Skip to content

Commit 8475c4a

Browse files
committed
refactor(mime_types): added new file extensions
The mime_types.py file was updated to include new file extensions for various media types. This ensures that the application can handle these file types correctly.
1 parent 1efdcd5 commit 8475c4a

1 file changed

Lines changed: 10 additions & 26 deletions

File tree

hydrogram/mime_types.py

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
# Hydrogram - Telegram MTProto API Client Library for Python
2-
# Copyright (C) 2017-2023 Dan <https://github.com/delivrance>
3-
# Copyright (C) 2023-present Hydrogram <https://hydrogram.org>
4-
#
5-
# This file is part of Hydrogram.
6-
#
7-
# Hydrogram is free software: you can redistribute it and/or modify
8-
# it under the terms of the GNU Lesser General Public License as published
9-
# by the Free Software Foundation, either version 3 of the License, or
10-
# (at your option) any later version.
11-
#
12-
# Hydrogram is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU Lesser General Public License for more details.
16-
#
17-
# You should have received a copy of the GNU Lesser General Public License
18-
# along with Hydrogram. If not, see <http://www.gnu.org/licenses/>.
19-
201
# From https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types.
212
# Extended with extra mime types specific to Telegram.
3+
224
mime_types = """
235
# This file maps Internet media types to unique file extension(s).
246
# Although created for httpd, this file is used by many software systems
@@ -164,7 +146,7 @@
164146
application/java-archive jar
165147
application/java-serialized-object ser
166148
application/java-vm class
167-
application/javascript js
149+
# application/javascript
168150
# application/jose
169151
# application/jose+json
170152
# application/jrd+json
@@ -607,6 +589,7 @@
607589
# application/vnd.geo+json
608590
# application/vnd.geocube+xml
609591
application/vnd.geogebra.file ggb
592+
application/vnd.geogebra.slides ggs
610593
application/vnd.geogebra.tool ggt
611594
application/vnd.geometry-explorer gex gre
612595
application/vnd.geonext gxt
@@ -1234,6 +1217,7 @@
12341217
application/vnd.zzazz.deck+xml zaz
12351218
application/voicexml+xml vxml
12361219
# application/vq-rtcpxr
1220+
application/wasm wasm
12371221
# application/watcherinfo+xml
12381222
# application/whoispp-query
12391223
# application/whoispp-response
@@ -1458,10 +1442,10 @@
14581442
# audio/mp4a-latm
14591443
# audio/mpa
14601444
# audio/mpa-robust
1461-
audio/mpeg mp3 mpga mp2 mp2a m2a m3a
1445+
audio/mpeg mpga mp2 mp2a mp3 m2a m3a
14621446
# audio/mpeg4-generic
14631447
# audio/musepack
1464-
audio/ogg ogg oga spx
1448+
audio/ogg oga ogg spx opus
14651449
# audio/opus
14661450
# audio/parityfec
14671451
# audio/pcma
@@ -1569,7 +1553,7 @@
15691553
image/ief ief
15701554
# image/jls
15711555
# image/jp2
1572-
image/jpeg jpg jpeg jpe
1556+
image/jpeg jpeg jpg jpe
15731557
# image/jpm
15741558
# image/jpx
15751559
image/ktx ktx
@@ -1665,7 +1649,7 @@
16651649
# model/vnd.gs.gdl
16661650
model/vnd.gtw gtw
16671651
# model/vnd.moml+xml
1668-
model/vnd.mts mts
1652+
# model/vnd.mts
16691653
# model/vnd.opengex
16701654
# model/vnd.parasolid.transmit.binary
16711655
# model/vnd.parasolid.transmit.text
@@ -1708,7 +1692,7 @@
17081692
# text/fwdred
17091693
# text/grammar-ref-list
17101694
text/html html htm
1711-
# text/javascript
1695+
text/javascript js mjs
17121696
# text/jcr-cnd
17131697
# text/markdown
17141698
# text/mizar
@@ -1804,7 +1788,7 @@
18041788
video/mj2 mj2 mjp2
18051789
# video/mp1s
18061790
# video/mp2p
1807-
# video/mp2t
1791+
video/mp2t ts m2t m2ts mts
18081792
video/mp4 mp4 mp4v mpg4
18091793
# video/mp4v-es
18101794
video/mpeg mpeg mpg mpe m1v m2v

0 commit comments

Comments
 (0)