Skip to content

Commit 0e0bded

Browse files
committed
typo on size key
1 parent 1ea3f83 commit 0e0bded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/sync/class-upload-sync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public function prep_on_demand_upload( $cloudinary_id, $attachment_id ) {
202202
if ( $attachment_id && false === $cloudinary_id ) {
203203
// Check that this has not already been prepared for upload.
204204
if ( ! $this->is_pending( $attachment_id ) && apply_filters( 'cloudinary_on_demand_sync_enabled', $this->enabled ) ) {
205-
$max_size = ( wp_attachment_is_image( $attachment_id ) ? 'image_max_size_bytes' : 'video_max_size_bytes' );
205+
$max_size = ( wp_attachment_is_image( $attachment_id ) ? 'max_image_size' : 'max_video_size' );
206206
$file = get_attached_file( $attachment_id );
207207
// Get the file size to make sure it can exist in cloudinary.
208208
if ( ! empty( $this->plugin->components['connect']->usage[ $max_size ] ) && file_exists( $file ) && filesize( $file ) < $this->plugin->components['connect']->usage[ $max_size ] ) {

0 commit comments

Comments
 (0)