You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I save a docx or a xlsx file with Libre office, the mimetype of these files are "application/octet-stream" and when uploading them as attachments - they get renamed to .txt which is not desired behavior.
I've tracked this bug down to "media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php" where there is only one mimetype defined for each of the files, but as you see - they can come as both.
I've managed to fix this by adding an additional "mime_types_extra" property to the class and doing an extra "else if" check on line 2987 to check this other array for mime types.
When I save a docx or a xlsx file with Libre office, the mimetype of these files are "application/octet-stream" and when uploading them as attachments - they get renamed to .txt which is not desired behavior.
I've tracked this bug down to "media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php" where there is only one mimetype defined for each of the files, but as you see - they can come as both.
I've managed to fix this by adding an additional "mime_types_extra" property to the class and doing an extra "else if" check on line 2987 to check this other array for mime types.
If you like, I can make a pull request.
Here are the test files saved with Libreoffice
attachment.docx
attachment.xlsx
The text was updated successfully, but these errors were encountered: