Skip to content

Commit 0e748ea

Browse files
committed
Fix detection for .mdb and .accdb files
1 parent a525d5b commit 0e748ea

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
@@ -42,3 +42,13 @@
4242
Marcel::MimeType.extend "application/vnd.adobe.flash.movie", magic: [[0, "FWS"], [0, "CWS"]], extensions: %w( swf )
4343
Marcel::MimeType.extend "application/sql", extensions: %w( sql )
4444
Marcel::MimeType.extend "text/vcard", magic: [[0, "BEGIN:VCARD"]], extensions: %w( vcf ), parents: "text/plain"
45+
46+
Marcel::MimeType.extend(
47+
"application/vnd.ms-access",
48+
extensions: %w( mdb accdb ),
49+
magic: [
50+
[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
51+
[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
52+
],
53+
parents: "application/x-msaccess"
54+
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)