Loading inc/class-s3-uploads-wordpress-uploads-uploader.php +6 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { if ( ! file_exists( $file ) || strpos( $file, WP_CONTENT_DIR ) !== 0 ) return $file; $relative = str_replace( WP_CONTENT_DIR, '', $file ); $relative = str_replace( WP_CONTENT_DIR . '/', '', $file ); $response = wp_remote_head( $this->get_s3_url() .'/'. $relative ); Loading Loading @@ -103,7 +103,7 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { if ( ! $path = get_post_meta( $attachment_id, 's3_path', true ) ) return $url; return $this->get_s3_url() . $path; return $this->get_s3_url() . '/' . $path; } /** Loading @@ -124,4 +124,8 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { } } } public function is_attachment_uploaded( $attachment_id ) { return (bool) get_post_meta( $attachment_id, 's3_path', true ); } } Loading
inc/class-s3-uploads-wordpress-uploads-uploader.php +6 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { if ( ! file_exists( $file ) || strpos( $file, WP_CONTENT_DIR ) !== 0 ) return $file; $relative = str_replace( WP_CONTENT_DIR, '', $file ); $relative = str_replace( WP_CONTENT_DIR . '/', '', $file ); $response = wp_remote_head( $this->get_s3_url() .'/'. $relative ); Loading Loading @@ -103,7 +103,7 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { if ( ! $path = get_post_meta( $attachment_id, 's3_path', true ) ) return $url; return $this->get_s3_url() . $path; return $this->get_s3_url() . '/' . $path; } /** Loading @@ -124,4 +124,8 @@ class S3_Uploads_WordPress_Uploads_Uploader extends S3_Uploads_Uploader { } } } public function is_attachment_uploaded( $attachment_id ) { return (bool) get_post_meta( $attachment_id, 's3_path', true ); } }