[wp-trac] [WordPress Trac] #47459: Introduce new a function to retrieve size of files

WordPress Trac noreply at wordpress.org
Tue Feb 11 15:48:41 UTC 2020


#47459: Introduce new a function to retrieve size of files
-----------------------------+----------------------
 Reporter:  justinahinon     |       Owner:  (none)
     Type:  feature request  |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Media            |     Version:
 Severity:  normal           |  Resolution:  invalid
 Keywords:  close            |     Focuses:
-----------------------------+----------------------

Comment (by SergeyBiryukov):

 Replying to [comment:6 Cybr]:
 > With all that, adding the file size to the metadata would be most
 welcome.
 >
 > I found that WordPress internally already tries to read this index (even
 though it doesn't exist):
 > https://core.trac.wordpress.org/browser/tags/5.2/src/wp-
 includes/media.php#L3271

 Good catch, looks like that was originally added for audio and video
 files, which should have that information extracted with getID3() library.
 Then it propagated to a few other areas. Related: comment:4:ticket:33214.

 Some history:
 * [23766] / #23673
 * [25403] / #25170
 * [34258] / #33214

 Feel free to create a new ticket to explore the idea of adding the file
 size to the metadata for any attachment.

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


More information about the wp-trac mailing list