Skip to content

Commit

Permalink
Fix aws config error in safe mode
Browse files Browse the repository at this point in the history
Speed up head object
  • Loading branch information
uglyrobot committed Oct 25, 2023
1 parent e5e0b43 commit 5676f45
Show file tree
Hide file tree
Showing 4 changed files with 503 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/class-infinite-uploads-stream-wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ private function createSubfolder( $path, array $params ) {
//Cache the stat for this file so we don't have to do another HeadObject in the same request
$cache_key = "iu://{$params['Bucket']}/{$params['Key']}";
if ( $bool ) {
$this->getCacheStorage()->set( $cache_key, $this->formatUrlStat( [ 'ContentLength' => $params['Body']->getSize(), 'LastModified' => time() ] ) );
$this->getCacheStorage()->set( $cache_key, $this->formatUrlStat( [ 'ContentLength' => 0, 'LastModified' => time() ] ) );
$this->debug_cache( 'SET', $cache_key );
//purposely don't cache this 0-length fake file
}
Expand Down
Loading

0 comments on commit 5676f45

Please sign in to comment.