Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase read bytes from file to detect xlsx mimetypes correctly #8088

Merged
merged 3 commits into from Feb 27, 2024

Conversation

Zharktas
Copy link
Member

@Zharktas Zharktas commented Feb 23, 2024

XLSX files technically are just zipped files and magic detects them as applcation/zip, internet sources say that reading about 2000 bytes should be enough to detect them as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

We had a custom object type where the files were handled with standard uploader and stumbled upon this.

This should be backported to 2.9 and 2.10 as well.

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

@wardi wardi self-assigned this Feb 27, 2024
@wardi wardi merged commit 3b3ac6a into master Feb 27, 2024
8 checks passed
@wardi wardi deleted the Zharktas-patch-2 branch February 27, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants