Skip to content

Commit

Permalink
TIKA-4382 : feat : support new MS Access format detection (#2116)
Browse files Browse the repository at this point in the history
* TIKA-4382 : feat : Support added for new ms access db file detection

(cherry picked from commit 84b0432)
  • Loading branch information
subbudvk authored and tballison committed Feb 11, 2025
1 parent 17e71b9 commit ade2db1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4643,6 +4643,7 @@
<glob pattern="*.xbap"/>
</mime-type>
<mime-type type="application/x-msaccess">
<glob pattern="*.accdb"/>
<glob pattern="*.mdb"/>
<magic priority="60">
<match value="0x000100005374616e" type="string" offset="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,14 @@ public void testGetExtensionForJavaScript() throws Exception {
assertEquals(List.of(".js", ".mjs"), mt.getExtensions());
}


@Test
public void testMSAccessByName() {
MimeTypes mimeTypes = MimeTypes.getDefaultMimeTypes();
MediaType result = mimeTypes.getMimeType("testfile1.accdb").getType();
assertEquals("application/x-msaccess", result.toString());
}

@Test
public void testGetAliasForJavaScript() throws Exception {
MimeType mt = this.mimeTypes.forName("text/javascript");
Expand Down

0 comments on commit ade2db1

Please sign in to comment.