Hi.
So an easy fix but quite breaking for existing projects, is to inject a connection-string or a CloudStorageAccount instead of StorageCredentials in BlobStorage.cs.
Any possibility for adding this in future releases?
Hi there! I don't see any problem adding a second constructor & extension method that creates the storage with a connection string & optional container name, like so:
public BlobStorage(string connectionString, string containerName = "uploads")
{
...
}
In fact, to get this going you should be able to just extend the BlobStorage class in your own project to test it:
using Piranha.Azure;
public CustomBlobStorage : BlobStorage
{
public CustomBlobStorage(string connectionString, string containerName = "uploads")
{
...
}
}
And register it in your Startup:
services.AddSingleton<IStorage>(new CustomBlobStorage(...));
Best regards
Very cool, thanks. I already did test with a connection string, and can confirm it solves the problem.
Hi there! Yes we could push a new release. I鈥檒l let you know when it鈥檚 available!
Version 5.3.1 of Piranha.Azure.BlobStorage is now available on NuGet
Most helpful comment
Hi there! I don't see any problem adding a second constructor & extension method that creates the storage with a connection string & optional container name, like so:
In fact, to get this going you should be able to just extend the BlobStorage class in your own project to test it:
And register it in your Startup:
Best regards