[wp-trac] [WordPress Trac] #57898: Google Doc saved as .docx file not allowed in media library

WordPress Trac noreply at wordpress.org
Sun Sep 3 12:50:06 UTC 2023


#57898: Google Doc saved as .docx file not allowed in media library
-------------------------------------------------+-------------------------
 Reporter:  winterstreet                         |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Upload                               |     Version:  6.1.1
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-screenshots changes-   |     Focuses:
  requested commit                               |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"56510" 56510]:
 {{{
 #!CommitTicketReference repository="" revision="56510"
 Upload: Correct duplicate MIME type for `.xlsx` files generated by Google
 Docs.

 This expands the code block previously added for `.docx` files to include
 `.xlsx` files as well, which are known to have the same issue with
 `finfo_file()`.

 Includes a unit test case for `wp_check_filetype_and_ext()`.

 Reference: [https://bugs.php.net/bug.php?id=77784 PHP Bug #77784:
 mime_content_type() result gets doubled for .xlsx].

 Follow-up to [56497].

 See #57898.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57898#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list