Skip to content

Commit a857808

Browse files
authored
Merge pull request #50 from gmcgibbon/mdb_accdb
Fix detection for .mdb and .accdb files
2 parents 811f6af + 0e748ea commit a857808

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

lib/marcel/mime_type/definitions.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,13 @@
4949
Marcel::MimeType.extend "application/vnd.adobe.flash.movie", magic: [[0, "FWS"], [0, "CWS"]], extensions: %w( swf )
5050
Marcel::MimeType.extend "application/sql", extensions: %w( sql )
5151
Marcel::MimeType.extend "text/vcard", magic: [[0, "BEGIN:VCARD"]], extensions: %w( vcf ), parents: "text/plain"
52+
53+
Marcel::MimeType.extend(
54+
"application/vnd.ms-access",
55+
extensions: %w( mdb accdb ),
56+
magic: [
57+
[0, "\x00\x01\x00\x00\x53\x74\x61\x6e\x64\x61\x72\x64\x20\x4a\x65\x74\x20\x44\x42"], # \x00\x01\x00\xStandard Jet DB
58+
[0, "\x00\x01\x00\x00\x53\x74\x61\x6e\x64\x61\x72\x64\x20\x41\x43\x45\x20\x44\x42"], # \x00\x01\x00\xStandard ACE DB
59+
],
60+
parents: "application/x-msaccess"
61+
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)