File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/formflow/library/file Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,13 @@ public FileValidationService(
8282 .sorted ()
8383 .collect (Collectors .toList ());
8484
85- if (ACCEPTED_FILE_EXTS .contains (".doc" )) {
86- // It's possible that Tika will return this for an MS Office document instead of the
85+ if (ACCEPTED_FILE_EXTS .contains (".doc" ) || ACCEPTED_FILE_EXTS . contains ( ".docx" ) ) {
86+ // It's possible that Tika will return this for an Office document instead of the
8787 // correct Mime Type, if the version of Office is old or Tika can't quite determine if
8888 // it's a Word vs Excel document (for example)
8989 // This little workaround will insert Tika's returned value in those cases of ambiguity.
9090 acceptedMimeTypes .add (new MimeType ("application" , "x-tika-msoffice" ));
91+ acceptedMimeTypes .add (new MimeType ("application" , "x-tika-ooxml" ));
9192 }
9293
9394 ACCEPTED_MIME_TYPES = acceptedMimeTypes ;
You can’t perform that action at this time.
0 commit comments