Some docx files can't be opened in S&D. #27

Open
opened 2 years ago by alex.puiu · 1 comments
Collaborator

Word2007 (docx) files saved with PhpWord or downloaded from Git.law cannot be opened in S&D.

Word2007 (docx) files saved with PhpWord or downloaded from Git.law cannot be opened in S&D.
Poster
Collaborator

I might have found a solution for this issue.

Try validating the file using mimetypes instead of mimes (https://git.law/newroco/searchanddisplace-core/src/branch/master/app/Http/Controllers/FileController.php#L26)

Example:

mimetypes:application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/octet-stream,application/pdf

Those validates just doc, docx, odt and pdf, but you can find a full list of MIME types here and add all the formats which has to be accepted in S&D.

I might have found a solution for this issue. Try validating the file using mimetypes instead of mimes (https://git.law/newroco/searchanddisplace-core/src/branch/master/app/Http/Controllers/FileController.php#L26) Example: ``` mimetypes:application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/octet-stream,application/pdf ``` Those validates just doc, docx, odt and pdf, but you can find a full list of MIME types [here](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) and add all the formats which has to be accepted in S&D.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.