mirror of
https://github.com/koel/koel
synced 2024-11-28 06:50:27 +00:00
26 lines
593 B
PHP
26 lines
593 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Filesystems;
|
||
|
|
||
|
use DateTimeInterface;
|
||
|
use League\Flysystem\Filesystem;
|
||
|
use Spatie\FlysystemDropbox\DropboxAdapter;
|
||
|
|
||
|
class DropboxFilesystem extends Filesystem
|
||
|
{
|
||
|
public function __construct(private DropboxAdapter $adapter)
|
||
|
{
|
||
|
parent::__construct($adapter, ['case_sensitive' => false]);
|
||
|
}
|
||
|
|
||
|
public function temporaryUrl(string $path, ?DateTimeInterface $expiresAt = null, array $config = []): string
|
||
|
{
|
||
|
return $this->adapter->getUrl($path);
|
||
|
}
|
||
|
|
||
|
public function getAdapter(): DropboxAdapter
|
||
|
{
|
||
|
return $this->adapter;
|
||
|
}
|
||
|
}
|