Hi team, thanks for maintaining this package.
I believe there is an integration gap with newer Laravel versions (tested on Laravel 12.x):
Storage::disk('bunnycdn')->temporaryUrl(...) throws:
RuntimeException: This driver does not support creating temporary URLs.
Even though this package supports temporary URL generation via BunnyCDNAdapter::temporaryUrl(...).
Environment
- PHP: 8.4.18
- Laravel: 12.53.0
platformcommunity/flysystem-bunnycdn: ^3.0
- Flysystem: v3 (via Laravel)
Current setup
Custom driver registration (as documented), including:
$adapter->setTokenAuthKey($config['token_auth_key']);
return new FilesystemAdapter(
new Filesystem($adapter, $config),
$adapter,
$config
);
Disk config includes token_auth_key.
Reproduction
- Register
bunnycdn disk via Storage::extend(...) (per README).
- Set valid Bunny credentials + token auth key.
- Call:
Storage::disk('bunnycdn')->temporaryUrl('path/to/file.pdf', now()->addHour());
Actual result
Laravel throws:
RuntimeException: This driver does not support creating temporary URLs.
Expected result
A signed Bunny temporary URL should be returned.
Technical note
Laravel’s Illuminate\Filesystem\FilesystemAdapter::temporaryUrl() currently checks for:
method_exists($this->adapter, 'getTemporaryUrl')
- or a registered
buildTemporaryUrlsUsing(...) callback.
Your adapter exposes temporaryUrl(...) (Flysystem interface), not getTemporaryUrl(...), so Laravel doesn’t detect support automatically.
Workaround on app side:
$filesystemAdapter->buildTemporaryUrlsUsing(
fn (string $path, DateTimeInterface $expiration, array $options = []) =>
$adapter->temporaryUrl($path, $expiration, new \League\Flysystem\Config($options))
);
Suggestion
Could the package optionally provide a Laravel-specific helper/driver registration path that sets buildTemporaryUrlsUsing(...) automatically?
That would align package behavior with the “temporary URLs supported” expectation for Laravel users.
Happy to provide a PR if you agree with this direction.
Hi team, thanks for maintaining this package.
I believe there is an integration gap with newer Laravel versions (tested on Laravel 12.x):
Storage::disk('bunnycdn')->temporaryUrl(...)throws:RuntimeException: This driver does not support creating temporary URLs.Even though this package supports temporary URL generation via
BunnyCDNAdapter::temporaryUrl(...).Environment
platformcommunity/flysystem-bunnycdn: ^3.0Current setup
Custom driver registration (as documented), including:
Disk config includes
token_auth_key.Reproduction
bunnycdndisk viaStorage::extend(...)(per README).Actual result
Laravel throws:
RuntimeException: This driver does not support creating temporary URLs.Expected result
A signed Bunny temporary URL should be returned.
Technical note
Laravel’s
Illuminate\Filesystem\FilesystemAdapter::temporaryUrl()currently checks for:method_exists($this->adapter, 'getTemporaryUrl')buildTemporaryUrlsUsing(...)callback.Your adapter exposes
temporaryUrl(...)(Flysystem interface), notgetTemporaryUrl(...), so Laravel doesn’t detect support automatically.Workaround on app side:
Suggestion
Could the package optionally provide a Laravel-specific helper/driver registration path that sets
buildTemporaryUrlsUsing(...)automatically?That would align package behavior with the “temporary URLs supported” expectation for Laravel users.
Happy to provide a PR if you agree with this direction.