|
20 | 20 | use MicrosoftAzure\Storage\Blob\Models\ListBlobsOptions; |
21 | 21 | use MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesOptions; |
22 | 22 | use MicrosoftAzure\Storage\Common\Exceptions\ServiceException; |
| 23 | +use MicrosoftAzure\Storage\Common\Internal\Resources; |
23 | 24 | use Neos\Error\Messages\Error; |
24 | 25 | use Neos\Flow\Annotations as Flow; |
25 | 26 | use Neos\Flow\Log\Utility\LogEnvironment; |
@@ -416,10 +417,7 @@ private function publishCollectionFromDifferentAzureBlobStorage(CollectionInterf |
416 | 417 | public function getPublicStaticResourceUri($relativePathAndFilename): string |
417 | 418 | { |
418 | 419 | $relativePathAndFilename = $this->encodeRelativePathAndFilenameForUri($relativePathAndFilename); |
419 | | - # TODO Use configured name |
420 | | - # https://<accountname>.blob.core.windows.net/ |
421 | | - $accountName = 'neosadaptortest'; |
422 | | - return sprintf('https://%s.blob.core.windows.net/%s/%s%s', $accountName, $this->containerName, $this->keyPrefix, $relativePathAndFilename); |
| 420 | + return sprintf('https://%s.%s/%s/%s%s', $this->blobService->getAccountName(), Resources::BLOB_BASE_DNS_NAME, $this->containerName, $this->keyPrefix, $relativePathAndFilename); |
423 | 421 | } |
424 | 422 |
|
425 | 423 | /** |
@@ -497,10 +495,7 @@ public function getPublicPersistentResourceUri(PersistentResource $resource): st |
497 | 495 | $customUri = $this->persistentResourceUriPattern; |
498 | 496 | if (empty($customUri)) { |
499 | 497 | if (empty($baseUri)) { |
500 | | - # TODO Use configured name |
501 | | - # https://<accountname>.blob.core.windows.net/ |
502 | | - $accountName = 'neosadaptortest'; |
503 | | - $baseUri = sprintf('https://%s.blob.core.windows.net/', $accountName); |
| 498 | + $baseUri = sprintf('https://%s.%s/', $this->blobService->getAccountName(), Resources::BLOB_BASE_DNS_NAME); |
504 | 499 | $customUri = '{baseUri}{containerName}/{keyPrefix}{sha1}/{filename}'; |
505 | 500 | } else { |
506 | 501 | $customUri = self::DEFAULT_PERSISTENT_RESOURCE_URI_PATTERN; |
|
0 commit comments