Changeset 45932 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 09/03/2019 12:39:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r45811 r45932 804 804 $file_size = filesize( $file['tmp_name'] ); 805 805 if ( $space_left < $file_size ) { 806 /* translators: %s: required disk space in kilobytes*/806 /* translators: %s: Required disk space in kilobytes. */ 807 807 return new WP_Error( 'rest_upload_limited_space', sprintf( __( 'Not enough space to upload. %s KB needed.' ), number_format( ( $file_size - $space_left ) / KB_IN_BYTES ) ), array( 'status' => 400 ) ); 808 808 } 809 809 810 810 if ( $file_size > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) { 811 /* translators: %s: maximum allowed file size in kilobytes*/811 /* translators: %s: Maximum allowed file size in kilobytes. */ 812 812 return new WP_Error( 'rest_upload_file_too_big', sprintf( __( 'This file is too big. Files must be less than %s KB in size.' ), get_site_option( 'fileupload_maxk', 1500 ) ), array( 'status' => 400 ) ); 813 813 }
Note: See TracChangeset
for help on using the changeset viewer.