changeset 48:ff113c3561c5

coding style + doc
author Alain Mazy <am@osimis.io>
date Fri, 02 Apr 2021 09:46:41 +0200
parents 1691da4ae9c3
children 6db76975d0f8
files Azure/AzureBlobStoragePlugin.cpp README.md
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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",