imazen / imageflow-dotnet-server

A super-fast image server to speed up your site - deploy as a microservice, serverless, or embeddable.
https://docs.imageflow.io
GNU Affero General Public License v3.0
252 stars 33 forks source link

Hard Coded Azure Containers #23

Closed hn1 closed 4 years ago

hn1 commented 4 years ago

When using ImageFlow Server, it seems one has to hard code the Azure Containers in Startup of an MVC Core application. As we are creating containers dynamically, is there any way one can avoid this?

It is suggested that we use our own blob provider. Any idea how this can be done? We would prefer to use proven solutions as opposed to roll out our own. Even better would be if this functionality was available in Imageflow. Thanks

lilith commented 4 years ago

I would suggest looking at the AzureBlobService to see how it works.

https://github.com/imazen/imageflow-dotnet-server/blob/main/src/Imageflow.Server.Storage.AzureBlob/AzureBlobService.cs

You'll need to implement 3 methods: GetPrefixes(), SupportsPath(string) and Fetch(string)

On Tue, Sep 15, 2020, 7:33 AM hn1 notifications@github.com wrote:

When using ImageFlow Server, it seems one has to hard code the Azure Containers in Startup of an MVC Core application. As we are creating containers dynamically, is there any way one can avoid this?

It is suggested that we use our own blob provider. Any idea how this can be done? Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow-dotnet-server/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LHYEZYE5ZRAAG2VOFL3SF5UMJANCNFSM4RNETKXA .

hn1 commented 4 years ago

Thanks for your guidance. It seems the List mappings property needs to also be pre-determined. If that s the case, this won't work in situation where an application is creating containers on the fly. And if this is not the case, where would one plug this class in. Sorry, we are not very familiar with these things. Another option is that if you will include this feature, we wait for that. Many thanks.

lilith commented 4 years ago

I've added an example class that does what you need. https://github.com/imazen/imageflow-dotnet-server/blob/379320000fb8283fa65efc372ab99627a770958f/examples/Imageflow.Server.Example/CustomBlobService.cs

You can see how it is configured by looking at Startup.cs in the Imageflow.Server.Example project.

hn1 commented 4 years ago

Thank you so much for this first class support.