Skip to content

Commit

Permalink
set cache time to 30s and fix target blob
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Solar committed Jun 17, 2024
1 parent 754317c commit 48da626
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/class-windows-azure-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static public function copy_media_to_blob_storage( $container_name, $destination
$cache_control = sprintf( "max-age=%d, must-revalidate", $cache_control );
}

$rest_api_client->put_blob_properties( $container_name, $destination_path, array(
$rest_api_client->put_blob_properties( $container_name, $source_path, array(
Windows_Azure_Rest_Api_Client::API_HEADER_MS_BLOB_CONTENT_TYPE => $mime_type,
Windows_Azure_Rest_Api_Client::API_HEADER_MS_BLOB_CACHE_CONTROL => apply_filters( 'windows_azure_blob_cache_control', $cache_control ),
Windows_Azure_Rest_Api_Client::API_HEADER_MS_ACCESS_TIER => apply_filters( 'windows_azure_blob_access_tier', 'Hot' ),
Expand Down
4 changes: 2 additions & 2 deletions includes/class-windows-azure-replace-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function replace_media_with( $source_attachment_id, $media_to_replace_id
$replace_filetype['type'],
'',
'',
0
30
);
}
} catch ( Exception $e ) {
Expand Down Expand Up @@ -313,7 +313,7 @@ public function process_media_thumbnails( $source_data, $replace_data ) {
$replace_data['mime_type'],
'',
'',
0,
30,
);
} catch ( Exception $e ) {
// translators: %s would be an error message
Expand Down

0 comments on commit 48da626

Please sign in to comment.