mini_mime 0.1.3 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 519524c1e8a814d03548d567200eae2af6255498
4
- data.tar.gz: 10173872af6271b41a3ac4723a8f1ceee26adc5d
2
+ SHA256:
3
+ metadata.gz: dad29ac32b63431b2602b9d5e26157db6e98b8edcc6dbccd8e843cc0ceb78670
4
+ data.tar.gz: d8eab6e3b66cd1133b95c10e08a9a9fd10bcdf9c373b4119872d9aa161e155e7
5
5
  SHA512:
6
- metadata.gz: 6f0ce7297cf0c718df1cf8a26aff6880136fdc84ec4f3c859792cf2d68064c2c2eb9beb8253cddf6238d4358da0608673627af31f66d158f0e4caa27b8c4e46b
7
- data.tar.gz: 2dae81f176221e7241876ab965eda0020709c3b9595c756f81303b86858f475a13220257f9ef89014dfb279f9cf6efa4b7f21cabb528f09582645ea0c7fbc075
6
+ metadata.gz: 8a0954805ffe7ae7c9085516677b7e94ad7f5c1e351979fe5eb01ff63fa5c2b29e6c85b96e4b8bf109dcd2fdd204b7d79eaf10aefda891198d9433f31b79e99a
7
+ data.tar.gz: 1bfee23498709b2cd132d2257b56187a411ea969c503819c616075fcfb8e10f839e3a41fa36e68a1e898b4871d695fe3084b184574dbef8a59316157fba2142e
@@ -0,0 +1,38 @@
1
+ name: Mini Mime Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ name: "Ruby ${{ matrix.ruby }} / Failure allowed: ${{ matrix.experimental }}"
13
+ continue-on-error: ${{ matrix.experimental }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: ["2.4", "2.5", "2.6", "2.7"]
18
+ experimental: [false]
19
+ include:
20
+ - ruby: "ruby-head"
21
+ experimental: true
22
+ - ruby: "jruby-head"
23
+ experimental: true
24
+ - ruby: "jruby-9.1.17.0"
25
+ experimental: true
26
+ - ruby: "jruby-9.2.13.0"
27
+ experimental: true
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ bundler-cache: true
34
+ - name: Rubocop
35
+ run: bundle exec rubocop
36
+ if: "!contains(matrix.ruby, 'jruby')"
37
+ - name: Tests
38
+ run: bundle exec rake test
@@ -0,0 +1,26 @@
1
+ name: Update MIME type DB
2
+
3
+ on:
4
+ schedule:
5
+ # 10am on the 1st every month https://crontab.guru/#0_10_1_*_*
6
+ - cron: "0 10 1 * *"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ update_db:
11
+ runs-on: ubuntu-latest
12
+ name: "Update MIME type DB"
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: "2.7"
18
+ bundler-cache: true
19
+ - name: Update mime-types-data
20
+ run: bundle update mime-types-data
21
+ - name: Update DB
22
+ run: bundle exec rake rebuild_db
23
+ - name: Create PR
24
+ run: bin/db_pull_request
25
+ env:
26
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_gem:
2
+ rubocop-discourse: default.yml
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
data/CHANGELOG CHANGED
@@ -1,3 +1,25 @@
1
+ 26-03-2021
2
+ - Version 1.0.3
3
+ - Update mime types from upstream
4
+
5
+ 08-07-2019
6
+ - Version 1.0.2
7
+ - Update mime types from upstream
8
+
9
+ 14-08-2018
10
+ - Version 1.0.1
11
+ - Update mime types from upstream
12
+ - Add lookup_by_extension to the public API
13
+
14
+ 08-11-2017
15
+ - Version 1.0.0
16
+ - Other than the version number, no difference from 0.1.4
17
+
18
+ 11-08-2017
19
+ - Version 0.1.4
20
+ - Return preferred extension when looking up by content type
21
+
22
+
1
23
  28-03-2016
2
24
 
3
25
  - Version 0.1.3
data/Gemfile CHANGED
@@ -1,6 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  source 'https://rubygems.org'
2
3
 
3
4
  # Specify your gem's dependencies in mini_mime.gemspec
4
5
  gemspec
5
6
 
6
7
  gem "mime-types", "~> 3" if RUBY_VERSION > '2'
8
+ gem "memory_profiler"
9
+ gem "benchmark-ips"
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 TODO: Write your name
3
+ Copyright (c) 2016 Discourse Construction Kit, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -26,6 +26,9 @@ require 'mini_mime'
26
26
  MiniMime.lookup_by_filename("a.txt").content_type
27
27
  # => "text/plain"
28
28
 
29
+ MiniMime.lookup_by_extension("txt").content_type
30
+ # => "text/plain"
31
+
29
32
  MiniMime.lookup_by_content_type("text/plain").extension
30
33
  # => "txt"
31
34
 
@@ -34,46 +37,63 @@ MiniMime.lookup_by_content_type("text/plain").binary?
34
37
 
35
38
  ```
36
39
 
40
+ ## Configuration
41
+
42
+ If you'd like to add your own mime types, try using custom database files:
43
+
44
+ ```
45
+ MiniMime::Configuration.ext_db_path = "path_to_file_extension_db"
46
+ MiniMime::Configuration.content_type_db_path = "path_to_content_type_db"
47
+ ```
48
+
49
+ Check out the [default databases](lib/db) for proper formatting and structure hints.
50
+
37
51
  ## Performance
38
52
 
39
- MiniMime is optimised to minimize memory usage. It keeps a cache of 100 mime type lookups (and 100 misses). There are benchmarks in the [bench directory](https://github.com/discourse/mini_mime/bench/bench.rb)
53
+ MiniMime is optimised to minimize memory usage. It keeps a cache of 100 mime type lookups (and 100 misses). There are benchmarks in the [bench directory](https://github.com/discourse/mini_mime/blob/master/bench/bench.rb)
40
54
 
41
55
  ```
42
56
  Memory stats for requiring mime/types/columnar
43
- Total allocated: 9869358 bytes (109796 objects)
44
- Total retained: 3138198 bytes (31165 objects)
57
+ Total allocated: 8712144 bytes (98242 objects)
58
+ Total retained: 3372545 bytes (33599 objects)
45
59
 
46
60
  Memory stats for requiring mini_mime
47
- Total allocated: 58898 bytes (398 objects)
48
- Total retained: 7784 bytes (62 objects)
61
+ Total allocated: 42625 bytes (369 objects)
62
+ Total retained: 8992 bytes (72 objects)
49
63
  Warming up --------------------------------------
50
64
  cached content_type lookup MiniMime
51
- 52.136k i/100ms
52
- content_type lookup Mime::Types
53
- 32.701k i/100ms
65
+ 85.109k i/100ms
66
+ content_type lookup MIME::Types
67
+ 17.879k i/100ms
54
68
  Calculating -------------------------------------
55
69
  cached content_type lookup MiniMime
56
- 641.305k3.2%) i/s - 3.232M in 5.045630s
57
- content_type lookup Mime::Types
58
- 361.041k (± 1.5%) i/s - 1.831M in 5.073290s
70
+ 1.105M4.1%) i/s - 5.532M in 5.014895s
71
+ content_type lookup MIME::Types
72
+ 193.528k7.1%) i/s - 965.466k in 5.013925s
59
73
  Warming up --------------------------------------
60
74
  uncached content_type lookup MiniMime
61
- 3.333k i/100ms
62
- content_type lookup Mime::Types
63
- 33.177k i/100ms
75
+ 1.410k i/100ms
76
+ content_type lookup MIME::Types
77
+ 18.012k i/100ms
64
78
  Calculating -------------------------------------
65
79
  uncached content_type lookup MiniMime
66
- 33.660k1.7%) i/s - 169.983k in 5.051415s
67
- content_type lookup Mime::Types
68
- 364.931k2.8%) i/s - 1.825M in 5.004112s
80
+ 14.689k4.2%) i/s - 73.320k in 5.000779s
81
+ content_type lookup MIME::Types
82
+ 193.459k6.9%) i/s - 972.648k in 5.050731s
69
83
  ```
70
84
 
71
- As a general guideline, cached lookups are 2x faster than MIME::Types equivelent. Uncached lookups are 10x slower.
85
+ As a general guideline, cached lookups are 6x faster than MIME::Types equivalent. Uncached lookups are 10x slower.
86
+
87
+ Note: It was run on macOS 10.14.2, and versions of Ruby and gems are below.
72
88
 
89
+ - Ruby 2.6.0
90
+ - mini_mime (1.0.1)
91
+ - mime-types (3.2.2)
92
+ - mime-types-data (3.2018.0812)
73
93
 
74
94
  ## Development
75
95
 
76
- MiniMime uses the officially maintained list of mime types at [mime-types-data](https://github.com/mime-types/mime-types-data)repo to build the internal database.
96
+ MiniMime uses the officially maintained list of mime types at [mime-types-data](https://github.com/mime-types/mime-types-data) repo to build the internal database.
77
97
 
78
98
  To update the database run:
79
99
 
@@ -89,8 +109,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
89
109
 
90
110
  Bug reports and pull requests are welcome on GitHub at https://github.com/discourse/mini_mime. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
91
111
 
92
-
93
112
  ## License
94
113
 
95
114
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
96
-
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "bundler/gem_tasks"
2
3
  require "rake/testtask"
3
4
 
@@ -7,7 +8,7 @@ Rake::TestTask.new(:test) do |t|
7
8
  t.test_files = FileList['test/**/*_test.rb']
8
9
  end
9
10
 
10
- task :default => :test
11
+ task default: :test
11
12
 
12
13
  def pad(array)
13
14
  max = []
@@ -36,30 +37,27 @@ task :rebuild_db do
36
37
  index = {}
37
38
 
38
39
  MIME::Types.each do |type|
39
- type.extensions.each {|ext| (index[ext.downcase] ||= []) << type}
40
+ type.extensions.each { |ext| (index[ext.downcase] ||= []) << type }
40
41
  end
41
42
 
42
- index.each do |k,list|
43
- list.sort!{|a,b| a.priority_compare(b)}
43
+ index.each do |k, list|
44
+ list.sort! { |a, b| a.priority_compare(b) }
44
45
  end
45
46
 
46
47
  buffer = []
47
48
 
48
49
  index.each do |ext, list|
49
- mime_type = nil
50
- list.each do |type|
51
- mime_type = type
52
- break unless type.obsolete?
53
- end
54
- mime_type = list.first if mime_type.obsolete?
50
+ mime_type = list.detect { |t| !t.obsolete? }
51
+ mime_type ||= list.detect(&:registered)
52
+ mime_type ||= list.first
55
53
  buffer << [ext.dup, mime_type.content_type.dup, mime_type.encoding.dup]
56
54
  end
57
55
 
58
56
  pad(buffer)
59
57
 
60
- buffer.sort!{|a,b| a[0] <=> b[0]}
58
+ buffer.sort! { |a, b| a[0] <=> b[0] }
61
59
 
62
- File.open("lib/db/ext_mime.db", File::CREAT|File::TRUNC|File::RDWR) do |f|
60
+ File.open("lib/db/ext_mime.db", File::CREAT | File::TRUNC | File::RDWR) do |f|
63
61
  buffer.each do |row|
64
62
  f.write "#{row[0]} #{row[1]} #{row[2]}\n"
65
63
  end
@@ -67,9 +65,23 @@ task :rebuild_db do
67
65
 
68
66
  puts "#{buffer.count} rows written to lib/db/ext_mime.db"
69
67
 
70
- buffer.sort!{|a,b| a[1] <=> b[1]}
68
+ buffer.sort! { |a, b| [a[1], a[0]] <=> [b[1], b[0]] }
69
+
70
+ # strip cause we are going to re-pad
71
+ buffer.each do |row|
72
+ row.each do |col|
73
+ col.strip!
74
+ end
75
+ end
76
+
77
+ # we got to confirm we pick the right extension for each type
78
+ buffer.each do |row|
79
+ row[0] = MIME::Types.type_for("xyz.#{row[0].strip}")[0].extensions[0].dup
80
+ end
81
+
82
+ pad(buffer)
71
83
 
72
- File.open("lib/db/content_type_mime.db", File::CREAT|File::TRUNC|File::RDWR) do |f|
84
+ File.open("lib/db/content_type_mime.db", File::CREAT | File::TRUNC | File::RDWR) do |f|
73
85
  last = nil
74
86
  count = 0
75
87
  buffer.each do |row|
data/bench/bench.rb CHANGED
@@ -1,9 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  require 'memory_profiler'
2
3
  require 'benchmark/ips'
3
4
 
4
5
  $: << File.expand_path('../../lib', __FILE__)
5
6
 
6
-
7
7
  puts
8
8
  puts "Memory stats for requiring mime/types/columnar"
9
9
  result = MemoryProfiler.report do
@@ -22,13 +22,12 @@ end
22
22
  puts "Total allocated: #{result.total_allocated_memsize} bytes (#{result.total_allocated} objects)"
23
23
  puts "Total retained: #{result.total_retained_memsize} bytes (#{result.total_retained} objects)"
24
24
 
25
-
26
25
  Benchmark.ips do |bm|
27
26
  bm.report 'cached content_type lookup MiniMime' do
28
27
  MiniMime.lookup_by_filename("a.txt").content_type
29
28
  end
30
29
 
31
- bm.report 'content_type lookup Mime::Types' do
30
+ bm.report 'content_type lookup MIME::Types' do
32
31
  MIME::Types.type_for("a.txt")[0].content_type
33
32
  end
34
33
  end
@@ -46,7 +45,7 @@ Benchmark.ips do |bm|
46
45
  MiniMime.lookup_by_filename("a.txt").content_type
47
46
  end
48
47
 
49
- bm.report 'content_type lookup Mime::Types' do
48
+ bm.report 'content_type lookup MIME::Types' do
50
49
  MIME::Types.type_for("a.txt")[0].content_type
51
50
  end
52
51
  end
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require "bundler/setup"
4
5
  require "mini_mime"
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "time"
5
+
6
+ if `git status --porcelain lib/db`.empty?
7
+ puts "Skipping, no DB changes to commit..."
8
+ return
9
+ end
10
+
11
+ moment = Time.now.utc
12
+ branch_name = "db-updates-#{moment.strftime("%Y%m%d%H%M%S")}"
13
+
14
+ system("git", "checkout", "-b", branch_name) || abort("Unable to create branch")
15
+ system("git", "add", "lib/db")
16
+ system("git", "config", "--local", "user.email", "actions@github.com")
17
+ system("git", "config", "--local", "user.name", "github-actions")
18
+ system("git", "commit", "-m", "DB updates #{moment.iso8601}") || abort("Unable to commit changes")
19
+ system("git", "push", "-u", "origin", branch_name) || abort("Unable to push branch")
20
+ system("gh", "pr", "create", "--title", "DB updates #{moment.iso8601}", "--body", "From Github Actions") || abort("Unable to create PR")
@@ -19,9 +19,7 @@ ecma application/ecmascript
19
19
  emma application/emma+xml base64
20
20
  epub application/epub+zip base64
21
21
  exi application/exi base64
22
- otf application/font-sfnt base64
23
22
  pfr application/font-tdpfr base64
24
- woff application/font-woff base64
25
23
  gml application/gml+xml base64
26
24
  gpx application/gpx+xml base64
27
25
  gxf application/gxf base64
@@ -31,7 +29,6 @@ ink application/inkml+xml
31
29
  ipfix application/ipfix base64
32
30
  jar application/java-archive base64
33
31
  ser application/java-serialized-object base64
34
- class application/java-vm base64
35
32
  js application/javascript 8bit
36
33
  json application/json 8bit
37
34
  jsonml application/jsonml+json base64
@@ -52,8 +49,8 @@ m21 application/mp21
52
49
  mp4 application/mp4 base64
53
50
  doc application/msword base64
54
51
  mxf application/mxf base64
55
- cdf application/netcdf base64
56
- ani application/octet-stream base64
52
+ nc application/netcdf base64
53
+ bin application/octet-stream base64
57
54
  oda application/oda base64
58
55
  opf application/oebps-package+xml base64
59
56
  ogx application/ogg base64
@@ -65,7 +62,7 @@ pdf application/pdf
65
62
  asc application/pgp-signature base64
66
63
  prf application/pics-rules base64
67
64
  p10 application/pkcs10 base64
68
- p7c application/pkcs7-mime base64
65
+ p7m application/pkcs7-mime base64
69
66
  p7s application/pkcs7-signature base64
70
67
  p8 application/pkcs8 base64
71
68
  ac application/pkix-attr-cert base64
@@ -74,10 +71,9 @@ crl application/pkix-crl
74
71
  pkipath application/pkix-pkipath base64
75
72
  pki application/pkixcmp base64
76
73
  pls application/pls+xml base64
77
- ai application/postscript 8bit
78
- pot application/powerpoint base64
74
+ eps application/postscript 8bit
79
75
  cw application/prs.cww base64
80
- rct application/prs.nprend base64
76
+ rnd application/prs.nprend base64
81
77
  pskcxml application/pskc+xml base64
82
78
  rdf application/rdf+xml 8bit
83
79
  rif application/reginfo+xml base64
@@ -131,12 +127,12 @@ mqy application/vnd.Mobius.MQY
131
127
  msl application/vnd.Mobius.MSL base64
132
128
  plc application/vnd.Mobius.PLC base64
133
129
  txf application/vnd.Mobius.TXF base64
134
- qwd application/vnd.Quark.QuarkXPress 8bit
130
+ qxd application/vnd.Quark.QuarkXPress 8bit
135
131
  twd application/vnd.SimTech-MindMapper base64
136
132
  aso application/vnd.accpac.simply.aso base64
137
133
  imp application/vnd.accpac.simply.imp base64
138
134
  acu application/vnd.acucobol base64
139
- acutc application/vnd.acucorp 7bit
135
+ atc application/vnd.acucorp 7bit
140
136
  air application/vnd.adobe.air-application-installer-package+zip base64
141
137
  fcdt application/vnd.adobe.formscentral.fcdt base64
142
138
  fxp application/vnd.adobe.fxp base64
@@ -212,7 +208,7 @@ fdf application/vnd.fdf
212
208
  mseed application/vnd.fdsn.mseed base64
213
209
  dataless application/vnd.fdsn.seed base64
214
210
  ftc application/vnd.fluxtime.clip base64
215
- book application/vnd.framemaker base64
211
+ frm application/vnd.framemaker base64
216
212
  fnc application/vnd.frogans.fnc base64
217
213
  ltf application/vnd.frogans.ltf base64
218
214
  fsc application/vnd.fsc.weblaunch 7bit
@@ -244,9 +240,9 @@ gtm application/vnd.groove-tool-message
244
240
  tpl application/vnd.groove-tool-template base64
245
241
  vcg application/vnd.groove-vcard base64
246
242
  hal application/vnd.hal+xml base64
247
- bpd application/vnd.hbci base64
243
+ hbci application/vnd.hbci base64
248
244
  les application/vnd.hhe.lesson-player base64
249
- hpgl application/vnd.hp-HPGL base64
245
+ plt application/vnd.hp-HPGL base64
250
246
  pcl application/vnd.hp-PCL base64
251
247
  pclxl application/vnd.hp-PCLXL base64
252
248
  hpid application/vnd.hp-hpid base64
@@ -291,7 +287,7 @@ sse application/vnd.kodak-descriptor
291
287
  lasxml application/vnd.las.las+xml base64
292
288
  lbd application/vnd.llamagraphics.life-balance.desktop base64
293
289
  lbe application/vnd.llamagraphics.life-balance.exchange+xml base64
294
- 123 application/vnd.lotus-1-2-3 base64
290
+ wks application/vnd.lotus-1-2-3 base64
295
291
  apr application/vnd.lotus-approach base64
296
292
  pre application/vnd.lotus-freelance base64
297
293
  nsf application/vnd.lotus-notes base64
@@ -312,7 +308,7 @@ xul application/vnd.mozilla.xul+xml
312
308
  cil application/vnd.ms-artgalry base64
313
309
  asf application/vnd.ms-asf base64
314
310
  cab application/vnd.ms-cab-compressed base64
315
- xla application/vnd.ms-excel base64
311
+ xls application/vnd.ms-excel base64
316
312
  xlam application/vnd.ms-excel.addin.macroEnabled.12 base64
317
313
  xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12 base64
318
314
  xlsm application/vnd.ms-excel.sheet.macroEnabled.12 base64
@@ -325,6 +321,7 @@ thmx application/vnd.ms-officetheme
325
321
  msg application/vnd.ms-outlook base64
326
322
  cat application/vnd.ms-pki.seccat base64
327
323
  stl application/vnd.ms-pki.stl base64
324
+ ppt application/vnd.ms-powerpoint base64
328
325
  ppam application/vnd.ms-powerpoint.addin.macroEnabled.12 base64
329
326
  pptm application/vnd.ms-powerpoint.presentation.macroEnabled.12 base64
330
327
  sldm application/vnd.ms-powerpoint.slide.macroEnabled.12 base64
@@ -340,7 +337,7 @@ mseq application/vnd.mseq
340
337
  mus application/vnd.musician base64
341
338
  msty application/vnd.muvee.style base64
342
339
  taglet application/vnd.mynfc base64
343
- bkm application/vnd.nervana base64
340
+ ent application/vnd.nervana base64
344
341
  nlu application/vnd.neurolanguage.nlu base64
345
342
  nitf application/vnd.nitf base64
346
343
  nnd application/vnd.noblenet-directory base64
@@ -354,14 +351,14 @@ edm application/vnd.novadigm.EDM
354
351
  edx application/vnd.novadigm.EDX base64
355
352
  ext application/vnd.novadigm.EXT base64
356
353
  odc application/vnd.oasis.opendocument.chart base64
357
- otc application/vnd.oasis.opendocument.chart-template base64
354
+ odc application/vnd.oasis.opendocument.chart-template base64
358
355
  odb application/vnd.oasis.opendocument.database base64
359
356
  odf application/vnd.oasis.opendocument.formula base64
360
- odft application/vnd.oasis.opendocument.formula-template base64
357
+ odf application/vnd.oasis.opendocument.formula-template base64
361
358
  odg application/vnd.oasis.opendocument.graphics base64
362
359
  otg application/vnd.oasis.opendocument.graphics-template base64
363
360
  odi application/vnd.oasis.opendocument.image base64
364
- oti application/vnd.oasis.opendocument.image-template base64
361
+ odi application/vnd.oasis.opendocument.image-template base64
365
362
  odp application/vnd.oasis.opendocument.presentation base64
366
363
  otp application/vnd.oasis.opendocument.presentation-template base64
367
364
  ods application/vnd.oasis.opendocument.spreadsheet base64
@@ -384,7 +381,7 @@ dotx application/vnd.openxmlformats-officedocument.wordprocessingml.templ
384
381
  mgp application/vnd.osgeo.mapguide.package base64
385
382
  dp application/vnd.osgi.dp base64
386
383
  esa application/vnd.osgi.subsystem base64
387
- oprc application/vnd.palm base64
384
+ prc application/vnd.palm base64
388
385
  paw application/vnd.pawaafile base64
389
386
  str application/vnd.pg.format base64
390
387
  ei6 application/vnd.pg.osasli base64
@@ -405,13 +402,13 @@ rm application/vnd.rn-realmedia
405
402
  rmvb application/vnd.rn-realmedia-vbr base64
406
403
  link66 application/vnd.route66.link66+xml base64
407
404
  st application/vnd.sailingtracker.track base64
408
- s1w application/vnd.sealed.doc base64
409
- sem application/vnd.sealed.eml base64
410
- smh application/vnd.sealed.mht base64
411
- s1p application/vnd.sealed.ppt base64
412
- s1e application/vnd.sealed.xls base64
413
- s1h application/vnd.sealedmedia.softseal.html base64
414
- s1a application/vnd.sealedmedia.softseal.pdf base64
405
+ sdoc application/vnd.sealed.doc base64
406
+ seml application/vnd.sealed.eml base64
407
+ smht application/vnd.sealed.mht base64
408
+ sppt application/vnd.sealed.ppt base64
409
+ sxls application/vnd.sealed.xls base64
410
+ stml application/vnd.sealedmedia.softseal.html base64
411
+ spdf application/vnd.sealedmedia.softseal.pdf base64
415
412
  see application/vnd.seemail base64
416
413
  sema application/vnd.sema base64
417
414
  semd application/vnd.semd base64
@@ -429,7 +426,7 @@ sdc application/vnd.stardivision.calc
429
426
  sds application/vnd.stardivision.chart base64
430
427
  sda application/vnd.stardivision.draw base64
431
428
  sdd application/vnd.stardivision.impress base64
432
- smf application/vnd.stardivision.math base64
429
+ sdf application/vnd.stardivision.math base64
433
430
  sdw application/vnd.stardivision.writer base64
434
431
  sgl application/vnd.stardivision.writer-global base64
435
432
  smzip application/vnd.stepmania.package base64
@@ -490,16 +487,16 @@ cmp application/vnd.yellowriver-custom-menu
490
487
  zir application/vnd.zul base64
491
488
  zaz application/vnd.zzazz.deck+xml base64
492
489
  vxml application/voicexml+xml base64
490
+ wasm application/wasm 8bit
493
491
  wif application/watcherinfo+xml base64
494
492
  wgt application/widget base64
495
- hlp application/winhlp base64
496
- wp application/wordperfect5.1 base64
493
+ wp5 application/wordperfect5.1 base64
497
494
  wsdl application/wsdl+xml base64
498
495
  wspolicy application/wspolicy+xml base64
499
496
  wk application/x-123 base64
500
497
  7z application/x-7z-compressed base64
501
498
  bck application/x-VMSBACKUP base64
502
- wkz application/x-Wingz base64
499
+ wz application/x-Wingz base64
503
500
  abw application/x-abiword base64
504
501
  ace application/x-ace-compressed base64
505
502
  dmg application/x-apple-diskimage base64
@@ -525,7 +522,7 @@ csh application/x-csh
525
522
  csm application/x-cu-seeme base64
526
523
  deb application/x-debian-package base64
527
524
  dgc application/x-dgc-compressed base64
528
- @dir application/x-director base64
525
+ dcr application/x-director base64
529
526
  wad application/x-doom base64
530
527
  ncx application/x-dtbncx+xml base64
531
528
  dtb application/x-dtbook+xml base64
@@ -538,7 +535,6 @@ gsf application/x-font-ghostscript
538
535
  psf application/x-font-linux-psf base64
539
536
  pcf application/x-font-pcf base64
540
537
  snf application/x-font-snf base64
541
- ttc application/x-font-ttf base64
542
538
  afm application/x-font-type1 base64
543
539
  arc application/x-freearc base64
544
540
  spl application/x-futuresplash base64
@@ -550,7 +546,7 @@ gtar application/x-gtar
550
546
  hdf application/x-hdf base64
551
547
  hep application/x-hep base64
552
548
  rhtml application/x-html+ruby 8bit
553
- php application/x-httpd-php 8bit
549
+ phtml application/x-httpd-php 8bit
554
550
  ibooks application/x-ibooks+zip base64
555
551
  ica application/x-ica base64
556
552
  imagemap application/x-imagemap 8bit
@@ -560,11 +556,12 @@ key application/x-iwork-keynote-sffkey
560
556
  numbers application/x-iwork-numbers-sffnumbers base64
561
557
  pages application/x-iwork-pages-sffpages base64
562
558
  jnlp application/x-java-jnlp-file base64
563
- latex application/x-latex 8bit
559
+ ltx application/x-latex 8bit
564
560
  cpt application/x-mac-compactpro base64
565
561
  mie application/x-mie base64
566
562
  mobi application/x-mobipocket-ebook base64
567
563
  application application/x-ms-application base64
564
+ exe application/x-ms-dos-executable base64
568
565
  lnk application/x-ms-shortcut base64
569
566
  wmd application/x-ms-wmd base64
570
567
  wmz application/x-ms-wmz base64
@@ -573,8 +570,8 @@ mda application/x-msaccess
573
570
  obd application/x-msbinder base64
574
571
  crd application/x-mscardfile base64
575
572
  clp application/x-msclip base64
576
- bat application/x-msdos-program base64
577
- msi application/x-msdownload base64
573
+ cmd application/x-msdos-program base64
574
+ exe application/x-msdownload base64
578
575
  m13 application/x-msmediaview base64
579
576
  emf application/x-msmetafile base64
580
577
  mny application/x-msmoney base64
@@ -599,6 +596,7 @@ sh application/x-sh
599
596
  shar application/x-shar 8bit
600
597
  swf application/x-shockwave-flash base64
601
598
  xap application/x-silverlight-app base64
599
+ notebook application/x-smarttech-notebook base64
602
600
  sav application/x-spss base64
603
601
  sql application/x-sql base64
604
602
  sit application/x-stuffit base64
@@ -612,12 +610,9 @@ tar application/x-tar
612
610
  tcl application/x-tcl 8bit
613
611
  tex application/x-tex 8bit
614
612
  tfm application/x-tex-tfm base64
615
- texi application/x-texinfo 8bit
613
+ texinfo application/x-texinfo 8bit
616
614
  obj application/x-tgif base64
617
615
  tbk application/x-toolbook base64
618
- man application/x-troff-man 8bit
619
- me application/x-troff-me base64
620
- ms application/x-troff-ms base64
621
616
  ustar application/x-ustar base64
622
617
  src application/x-wais-source base64
623
618
  webapp application/x-web-app-manifest+json base64
@@ -650,8 +645,8 @@ smv audio/SMV
650
645
  adp audio/adpcm base64
651
646
  au audio/basic base64
652
647
  kar audio/midi base64
653
- f4a audio/mp4 base64
654
- m2a audio/mpeg base64
648
+ mp4 audio/mp4 base64
649
+ mpga audio/mpeg base64
655
650
  oga audio/ogg base64
656
651
  s3m audio/s3m base64
657
652
  sil audio/silk base64
@@ -670,7 +665,8 @@ ecelp7470 audio/vnd.nuera.ecelp7470
670
665
  ecelp9600 audio/vnd.nuera.ecelp9600 base64
671
666
  qcp audio/vnd.qcelp base64
672
667
  rip audio/vnd.rip base64
673
- s1m audio/vnd.sealedmedia.softseal.mpeg base64
668
+ smp3 audio/vnd.sealedmedia.softseal.mpeg base64
669
+ wav audio/wav base64
674
670
  weba audio/webm base64
675
671
  aac audio/x-aac base64
676
672
  aif audio/x-aiff base64
@@ -683,30 +679,39 @@ wma audio/x-ms-wma
683
679
  wmv audio/x-ms-wmv base64
684
680
  ra audio/x-pn-realaudio base64
685
681
  rmp audio/x-pn-realaudio-plugin base64
686
- wav audio/x-wav base64
687
682
  xm audio/xm base64
688
683
  cdx chemical/x-cdx base64
689
684
  cif chemical/x-cif base64
690
685
  cmdf chemical/x-cmdf base64
691
686
  cml chemical/x-cml base64
692
687
  csml chemical/x-csml base64
688
+ ttc font/collection base64
689
+ otf font/otf base64
690
+ ttf font/ttf base64
691
+ woff font/woff base64
692
+ woff2 font/woff2 base64
693
+ avif image/avif base64
693
694
  cgm image/cgm base64
694
695
  g3 image/g3fax base64
695
696
  gif image/gif base64
697
+ heic image/heic base64
698
+ heics image/heic-sequence base64
699
+ heif image/heif base64
700
+ heifs image/heif-sequence base64
696
701
  ief image/ief base64
697
702
  jp2 image/jp2 base64
698
- jpe image/jpeg base64
699
- jpgm image/jpm base64
700
- jpf image/jpx base64
703
+ jpeg image/jpeg base64
704
+ jpm image/jpm base64
705
+ jpx image/jpx base64
701
706
  ktx image/ktx base64
702
707
  png image/png base64
703
708
  btif image/prs.btif base64
704
709
  sgi image/sgi base64
705
710
  svg image/svg+xml 8bit
706
- tif image/tiff base64
711
+ tiff image/tiff base64
707
712
  psd image/vnd.adobe.photoshop base64
708
713
  uvg image/vnd.dece.graphic base64
709
- djv image/vnd.djvu base64
714
+ djvu image/vnd.djvu base64
710
715
  sub image/vnd.dvb.subtitle base64
711
716
  dwg image/vnd.dwg base64
712
717
  dxf image/vnd.dxf base64
@@ -724,21 +729,37 @@ wbmp image/vnd.wap.wbmp
724
729
  xif image/vnd.xiff base64
725
730
  webp image/webp base64
726
731
  3ds image/x-3ds base64
732
+ dng image/x-adobe-dng base64
727
733
  bmp image/x-bmp base64
734
+ cr2 image/x-canon-cr2 base64
735
+ crw image/x-canon-crw base64
728
736
  ras image/x-cmu-raster base64
729
737
  cmx image/x-cmx base64
730
738
  xcfbz2 image/x-compressed-xcf base64
739
+ erf image/x-epson-erf base64
731
740
  fh image/x-freehand base64
741
+ raf image/x-fuji-raf base64
732
742
  3fr image/x-hasselblad-3fr base64
743
+ k25 image/x-kodak-k25 base64
744
+ kdc image/x-kodak-kdc base64
745
+ mrw image/x-minolta-mrw base64
733
746
  sid image/x-mrsid-image base64
747
+ nef image/x-nikon-nef base64
748
+ orf image/x-olympus-orf base64
734
749
  psp image/x-paintshoppro base64
750
+ raw image/x-panasonic-raw base64
735
751
  pcx image/x-pcx base64
752
+ pef image/x-pentax-pef base64
736
753
  pct image/x-pict base64
737
754
  pnm image/x-portable-anymap base64
738
755
  pbm image/x-portable-bitmap base64
739
756
  pgm image/x-portable-graymap base64
740
757
  ppm image/x-portable-pixmap base64
741
758
  rgb image/x-rgb base64
759
+ x3f image/x-sigma-x3f base64
760
+ arw image/x-sony-arw base64
761
+ sr2 image/x-sony-sr2 base64
762
+ srf image/x-sony-srf base64
742
763
  tga image/x-targa base64
743
764
  dgn image/x-vnd.dgn base64
744
765
  xbm image/x-xbitmap 7bit
@@ -746,8 +767,8 @@ xcf image/x-xcf
746
767
  xpm image/x-xpixmap 8bit
747
768
  xwd image/x-xwindowdump base64
748
769
  eml message/rfc822 8bit
749
- iges model/iges base64
750
- mesh model/mesh base64
770
+ igs model/iges base64
771
+ msh model/mesh base64
751
772
  dae model/vnd.collada+xml base64
752
773
  dwf model/vnd.dwf base64
753
774
  gdl model/vnd.gdl base64
@@ -756,7 +777,7 @@ mts model/vnd.mts
756
777
  x_b model/vnd.parasolid.transmit.binary base64
757
778
  x_t model/vnd.parasolid.transmit.text quoted-printable
758
779
  vtu model/vnd.vtu base64
759
- vrml model/vrml base64
780
+ wrl model/vrml base64
760
781
  x3db model/x3d+binary base64
761
782
  x3dv model/x3d+vrml base64
762
783
  x3d model/x3d+xml base64
@@ -764,14 +785,15 @@ appcache text/cache-manifest
764
785
  ics text/calendar quoted-printable
765
786
  css text/css 8bit
766
787
  csv text/csv 8bit
767
- htm text/html 8bit
788
+ html text/html 8bit
789
+ markdown text/markdown quoted-printable
768
790
  n3 text/n3 quoted-printable
769
- c text/plain quoted-printable
791
+ txt text/plain quoted-printable
770
792
  dsc text/prs.lines.tag quoted-printable
771
793
  rtx text/richtext 8bit
772
- sgm text/sgml quoted-printable
794
+ sgml text/sgml quoted-printable
773
795
  tsv text/tab-separated-values quoted-printable
774
- roff text/troff 8bit
796
+ t text/troff 8bit
775
797
  ttl text/turtle quoted-printable
776
798
  uri text/uri-list quoted-printable
777
799
  vcard text/vcard quoted-printable
@@ -790,7 +812,7 @@ sl text/vnd.wap.sl
790
812
  wml text/vnd.wap.wml quoted-printable
791
813
  wmls text/vnd.wap.wmlscript quoted-printable
792
814
  asm text/x-asm quoted-printable
793
- cxx text/x-c quoted-printable
815
+ c text/x-c quoted-printable
794
816
  coffee text/x-coffescript 8bit
795
817
  htc text/x-component 8bit
796
818
  f text/x-fortran quoted-printable
@@ -804,6 +826,7 @@ uu text/x-uuencode
804
826
  vcs text/x-vcalendar 8bit
805
827
  vcf text/x-vcard 8bit
806
828
  yaml text/x-yaml 8bit
829
+ xml text/xml 8bit
807
830
  3gp video/3gpp base64
808
831
  3g2 video/3gpp2 base64
809
832
  dv video/DV base64
@@ -813,10 +836,10 @@ h264 video/H264
813
836
  jpgv video/JPEG base64
814
837
  mj2 video/MJ2 base64
815
838
  ts video/MP2T base64
816
- f4p video/mp4 base64
817
- m1v video/mpeg base64
818
- ogv video/ogg base64
819
- mov video/quicktime base64
839
+ mp4 video/mp4 base64
840
+ mp2 video/mpeg base64
841
+ ogg video/ogg base64
842
+ qt video/quicktime base64
820
843
  uvh video/vnd.dece.hd base64
821
844
  uvm video/vnd.dece.mobile base64
822
845
  uvp video/vnd.dece.pd base64
@@ -824,14 +847,14 @@ uvs video/vnd.dece.sd
824
847
  uvv video/vnd.dece.video base64
825
848
  dvb video/vnd.dvb.file base64
826
849
  fvt video/vnd.fvt base64
827
- m4u video/vnd.mpegurl 8bit
850
+ mxu video/vnd.mpegurl 8bit
828
851
  pyv video/vnd.ms-playready.media.pyv base64
829
852
  nim video/vnd.nokia.interleaved-multimedia base64
830
- m4v video/vnd.objectvideo base64
853
+ mp4 video/vnd.objectvideo base64
831
854
  s11 video/vnd.sealed.mpeg1 base64
832
- s14 video/vnd.sealed.mpeg4 base64
833
- ssw video/vnd.sealed.swf base64
834
- s1q video/vnd.sealedmedia.softseal.mov base64
855
+ smpg video/vnd.sealed.mpeg4 base64
856
+ sswf video/vnd.sealed.swf base64
857
+ smov video/vnd.sealedmedia.softseal.mov base64
835
858
  uvu video/vnd.uvvu.mp4 base64
836
859
  viv video/vnd.vivo base64
837
860
  dl video/x-dl base64
@@ -841,8 +864,8 @@ gl video/x-gl
841
864
  ivf video/x-ivf base64
842
865
  mk3d video/x-matroska base64
843
866
  mng video/x-mng base64
844
- mjpeg video/x-motion-jpeg base64
845
- asx video/x-ms-asf base64
867
+ mjpg video/x-motion-jpeg base64
868
+ asf video/x-ms-asf base64
846
869
  vob video/x-ms-vob base64
847
870
  wm video/x-ms-wm base64
848
871
  wmx video/x-ms-wmx base64