Mercurial > hg > orthanc-object-storage
comparison Azure/AzureBlobStoragePlugin.cpp @ 12:a203d0a4fd8f
Azure: now removing spaces and CR at the end of the connectionString since it prevented the plugin to initialize.
author | Alain Mazy |
---|---|
date | Wed, 26 Aug 2020 12:50:39 +0200 |
parents | 1b85dc5eb372 |
children | 2a02b21f0a19 |
comparison
equal
deleted
inserted
replaced
11:1b85dc5eb372 | 12:a203d0a4fd8f |
---|---|
19 #include "AzureBlobStoragePlugin.h" | 19 #include "AzureBlobStoragePlugin.h" |
20 | 20 |
21 #include <was/storage_account.h> | 21 #include <was/storage_account.h> |
22 #include <was/blob.h> | 22 #include <was/blob.h> |
23 #include <boost/lexical_cast.hpp> | 23 #include <boost/lexical_cast.hpp> |
24 #include <boost/algorithm/string.hpp> | |
24 #include "cpprest/rawptrstream.h" | 25 #include "cpprest/rawptrstream.h" |
25 | 26 |
26 | 27 |
27 // Create aliases to make the code easier to read. | 28 // Create aliases to make the code easier to read. |
28 namespace as = azure::storage; | 29 namespace as = azure::storage; |
168 { | 169 { |
169 OrthancPlugins::LogError("AzureBlobStorage/ContainerName configuration missing. Unable to initialize plugin"); | 170 OrthancPlugins::LogError("AzureBlobStorage/ContainerName configuration missing. Unable to initialize plugin"); |
170 return nullptr; | 171 return nullptr; |
171 } | 172 } |
172 | 173 |
174 boost::trim(connectionString); // without that, if there's an EOL in the string, it fails with "provided uri is invalid" | |
175 boost::trim(containerName); | |
173 } | 176 } |
174 else if (orthancConfig.IsSection("BlobStorage")) // backward compatibility with the old plugin: | 177 else if (orthancConfig.IsSection("BlobStorage")) // backward compatibility with the old plugin: |
175 { | 178 { |
176 OrthancPlugins::LogWarning("AzureBlobStorage: you're using an old configuration format for the plugin."); | 179 OrthancPlugins::LogWarning("AzureBlobStorage: you're using an old configuration format for the plugin."); |
177 | 180 |