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

Rewrite of MimeTypeMap to support extensions with multiple mimetypes #296

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

tjololo
Copy link
Member

@tjololo tjololo commented Aug 25, 2023

Description

Some file extensions can be represented by multiple mimetypes
Example: zip files can be application/zip, application/zip-compressed or application/x-zip-compressed

There are still some missing mappings between extension and mimetypes, but I propose to fix them in a separate PR to make the changes more visible while reviewing

Related Issue(s)

Fixes #295

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

…e aliases.

Example: zip files can be application/zip, application/zip-compressed or application/x-zip-compressed
@sonarcloud
Copy link

sonarcloud bot commented Aug 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

99.1% 99.1% Coverage
0.0% 0.0% Duplication

@tjololo tjololo marked this pull request as ready for review August 28, 2023 10:49
@tjololo
Copy link
Member Author

tjololo commented Aug 28, 2023

I removed the mimetype -> extension method as it was unused in our code and couldn't find any usage of it in altinn.studio. Either way it would potentially make the wrong assumption as .xsd and .xml both have mimetype text/xml for example

Copy link
Member

@RonnyB71 RonnyB71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕹️

@tjololo tjololo merged commit 0e2e509 into main Aug 28, 2023
12 checks passed
@tjololo tjololo deleted the bugfix/support-multiple-mimetypes branch August 28, 2023 13:22
@tjololo tjololo added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Label Pull requests with bugfix. Used when generation releasenotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support multiple mimetypes for fileextensions
2 participants