Skip to content

Commit

Permalink
feat: support private visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ramzeng authored May 26, 2023
1 parent 27da0c9 commit 549e6fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CosAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ protected function listObjects(string $directory = '', bool $recursive = false)

protected function normalizeVisibility(string $visibility): string
{
return $visibility === Visibility::PUBLIC ? 'public-read' : 'default';
return match ($visibility) {
Visibility::PUBLIC => 'public-read',
Visibility::PRIVATE => 'private',
default => 'default',
};
}
}

0 comments on commit 549e6fe

Please sign in to comment.