4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-14 21:26:37 +00:00

Improve URL and cache keys for Dropbox adapters.

This commit is contained in:
Buster "Silver Eagle" Neece 2020-12-09 13:27:59 -06:00
parent a652f38847
commit 63aa00ef31
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
2 changed files with 8 additions and 1 deletions

View File

@ -446,7 +446,7 @@ class StorageLocation
break;
case self::ADAPTER_DROPBOX:
return 'dropbox://' . ltrim($path, '/');
return 'dropbox://' . $this->dropboxAuthToken . ltrim($path, '/');
break;
case self::ADAPTER_LOCAL:

View File

@ -120,6 +120,13 @@ class FilesystemManager
$objectUrl = $s3Client->getObjectUrl($bucket, $adapter->applyPathPrefix('/cache'));
return $this->filterCacheKey($objectUrl);
}
if ($adapter instanceof DropboxAdapter) {
return $this->filterCacheKey(
'dropbox_' . $adapter->getClient()->getAccessToken() . $adapter->applyPathPrefix('/cache')
);
}
if ($adapter instanceof AbstractAdapter) {
return $this->filterCacheKey(ltrim($adapter->getPathPrefix(), '/'));
}