Skip to content

Commit be20d27

Browse files
committed
support url generation
1 parent e841fdd commit be20d27

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/CloudinaryStorageAdapter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ public function __construct(private Cloudinary $cloudinary, string $prefix = '',
2525
$this->mimeTypeDetector = $mimeTypeDetector ?: new FinfoMimeTypeDetector;
2626
}
2727

28+
public function getUrl(string $path): string
29+
{
30+
[$id] = $this->prepareResource($path);
31+
32+
return $this->cloudinary->adminApi()->asset($id)->offsetGet('secure_url');
33+
}
34+
2835
public function copy(string $source, string $destination, Config $config): void
2936
{
3037
[$source] = $this->prepareResource($source);

0 commit comments

Comments
 (0)