# HG changeset patch # User Alain Mazy # Date 1617349601 -7200 # Node ID ff113c3561c57c4ba6bd9b24c42c174e9ac710b9 # Parent 1691da4ae9c356c911b2b11d719e55a81ca7eb20 coding style + doc diff -r 1691da4ae9c3 -r ff113c3561c5 Azure/AzureBlobStoragePlugin.cpp --- a/Azure/AzureBlobStoragePlugin.cpp Fri Apr 02 09:30:52 2021 +0200 +++ b/Azure/AzureBlobStoragePlugin.cpp Fri Apr 02 09:46:41 2021 +0200 @@ -162,7 +162,7 @@ return "Azure Blob Storage"; } -bool isSasTokenAccountLevel(utility::string_t sasToken) +bool IsSasTokenAccountLevel(utility::string_t sasToken) { // Use cpprestsdk's utility::string_t here since the expected argument is the return value of // as::storage_credentials::sas_token(), which is type utility::string_t @@ -170,7 +170,7 @@ size_t prevIdx = 0; while ((newIdx = sasToken.find('&', prevIdx)) != utility::string_t::npos) { - utility::string_t kvpair = sasToken.substr(prevIdx, newIdx-prevIdx); + utility::string_t kvpair = sasToken.substr(prevIdx, newIdx - prevIdx); prevIdx = newIdx + 1; // start next time from char after '&' size_t equalsIdx = kvpair.find('='); @@ -274,7 +274,7 @@ // Only allow the use of this function when using storage account-level credentials, whether // through accountName/accountKey combo or account SAS. if ((storageAccount.credentials().is_account_key() || - (storageAccount.credentials().is_sas() && isSasTokenAccountLevel(storageAccount.credentials().sas_token()))) + (storageAccount.credentials().is_sas() && IsSasTokenAccountLevel(storageAccount.credentials().sas_token()))) && createContainerIfNotExists) { // Return value is true if the container did not exist and was successfully created. diff -r 1691da4ae9c3 -r ff113c3561c5 README.md --- a/README.md Fri Apr 02 09:30:52 2021 +0200 +++ b/README.md Fri Apr 02 09:46:41 2021 +0200 @@ -82,6 +82,7 @@ "AzureBlobStorage" : { "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=xxxxxxxxx;AccountKey=yyyyyyyy===;EndpointSuffix=core.windows.net", "ContainerName" : "test-orthanc-storage-plugin", + "CreateContainerIfNotExists": true, // available from version 1.2.0 (not released yet) "RootPath": "", // optional: folder in which files are stored (ex: my/path/to/myfolder) "StorageEncryption" : {...}, "StorageStructure" : "flat",