Timeline for How do I get the size of an attachment file?
Current License: CC BY-SA 2.5
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2019 at 12:53 | comment | added | Alex Standiford |
This is good, but be warned that filesize will throw a warning if get_attached_file returns false. You should add a check to ensure that get_attached_file returns a file that exists.
|
|
Mar 28, 2013 at 11:20 | comment | added | KarSho | i need to get only one post attachment's file size. i used get_the_ID() in post_parent. but no use. | |
Sep 3, 2010 at 9:00 | vote | accept | Bobby Jack | ||
Aug 18, 2010 at 9:18 | comment | added | Bobby Jack |
Ah - that looks much better than messing around with wp_upload_dir() etc.!
|
|
Aug 18, 2010 at 9:17 | history | answered | Joe Hoyle | CC BY-SA 2.5 |