Try our conversational search powered by Generative AI!

Blob Provider in Add-ON


Hi i am creating a add-on and i want to register a new Blob Provider, but i have several problems

1) i cannot use the BlobFactory beacause it in not loading in  the Container

2) i cannot register a new BlobProvider creating a new BlobFactory and adding to the container because it is using the default Blob Provider.

There are some samples how to create a new Blob Provider into a Add-On.


Sep 30, 2014 18:38

1) Are you referring to case when AddOn receives different instance of IoC container? Haven't tested myself.

2) If you take a look at EPiServer.Framework.FrameworkInitialization.InitializeBlobProviders() FileBlobProvider should be registered if no default provider has been specified in configuration. If you however in 1) receive real and the only IoC container - you should be able to switch default blog factory.

But anyway - question is: do you want to swap out default provider or you want to add your provider to the list of providers?

Sep 30, 2014 21:19

I want to swap the default provider in an Add-on.


Oct 14, 2014 19:14

Then you should be good by removing current provider and adding new one: (writting without even compiling it :)

var factory = ServiceLocator.Current.GetInstance<BlobFactory>();

factory.RegisterProvider({you provider here});
Oct 14, 2014 21:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.