Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
gzip is a popular file format and a software application used for file compression and decompression. Working with file entity and media module, this small support can give the site builders more choices for the documents.
Ref: https://tools.ietf.org/html/rfc6713
Proposed resolution
Add gzip to default MIME extension mapping list
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
@todo
Comment | File | Size | Author |
---|---|---|---|
#7 | 3032852-2-again.patch | 860 bytes | dww |
#2 | 3032852-2.patch | 860 bytes | pandaski |
Comments
Comment #2
pandaski CreditAttribution: pandaski at govCMS (Australian Government Department of Finance) commentedComment #3
dwwLooks good to me. I agree that .gz is a commonly used file type that core should be able to guess the mime type of, and we already handle .tgz files in this class.
There seems to be 0 test coverage of this class in core, so it seems out of scope to be requiring a test for this issue. If we want to test this class, we need to test a lot more than .gz. ;) The only test that comes close is
core/tests/Drupal/Tests/Core/File/MimeTypeGuesserTest.php
but that's not testing theMimeTypeGuesser
and its guesses, it's only testing that we properly register it with Symfony. SeeMimeTypeGuesserTest::testSymfonyGuesserRegistration()
. So, I can't in good conscience set this NW and tag "needs tests".Given that, there's nothing wrong with this patch.
RTBC.
Thanks,
-Derek
Comment #5
dwwConfused bot. Requeued #2. Back to RTBC.
Comment #7
dwwSad confused bot. :/ Trying to re-upload #2 to see if this helps.
Comment #8
pandaski CreditAttribution: pandaski at govCMS (Australian Government Department of Finance) commentedComment #10
dwwSilly bot. Re-queued...
Comment #12
Krzysztof DomańskiRe-queued. Back to RTBC.
Comment #13
alexpottCommitted 2020819 and pushed to 8.7.x. Thanks!