Skip to content

Commit

Permalink
Update inc/cloudfront_media_purge/namespace.php
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan McCue <[email protected]>
  • Loading branch information
joehoyle and rmccue authored Feb 8, 2024
1 parent 03d4ec0 commit 7e1e5bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/cloudfront_media_purge/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function purge_media_file_cache( int $media_id ) {
$upload_path_info = pathinfo( $upload_path );
$items = [];
// Make sure the image filename is URL encoded, else CloudFront will not be able to purge it.
$items[] = $upload_path_info['dirname'] . '/' . urlencode( $upload_path_info['filename'] ) . '*';
$items[] = $upload_path_info['dirname'] . '/' . urlencode( $upload_path_info['filename'] ) . '*';
if ( function_exists( 'tachyon_url' ) ) {
$tachyon_url = tachyon_url( $upload_url );
$tachyon_path = wp_parse_url( $tachyon_url, PHP_URL_PATH );
Expand Down

0 comments on commit 7e1e5bb

Please sign in to comment.