IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2762 | 2762 | } |
2763 | 2763 | |
2764 | 2764 | $attached_file = get_attached_file( $attachment->ID ); |
2765 | | if ( file_exists( $attached_file ) ) { |
| 2765 | |
| 2766 | $bytes = false; |
| 2767 | if ( isset( $meta['filesize'] ) ) { |
| 2768 | $bytes = $meta['filesize']; |
| 2769 | } else if ( file_exists( $attached_file ) ) { |
2766 | 2770 | $bytes = filesize( $attached_file ); |
| 2771 | } |
| 2772 | |
| 2773 | if ( ! empty( $bytes ) ) { |
2767 | 2774 | $response['filesizeInBytes'] = $bytes; |
2768 | 2775 | $response['filesizeHumanReadable'] = size_format( $bytes ); |
2769 | 2776 | } |