jakeFeldman / strapi-provider-upload-azure-storage

Strapi Provider Upload Azure Storage
MIT License
75 stars 42 forks source link

Plugin doesn't use updated configuration using strapi.config.set in strapi register function #63

Open AmilaDotDev opened 1 year ago

AmilaDotDev commented 1 year ago

Info: Node version: 16.15.0 Strapi version: 4.6.0 strapi-provider-upload-azure-storage version: 3.1.2

I'm using azure app configuration to setup configuration for Strapi. I do this within the register async function in index.js file in Strapi. I can see the config for plugin gets updated console.log(strapi.config.get('plugin.upload')).

But it does not use the values from the updated configuration. I haven't dug into how the plugins are initialised in Strapi, but just want to check if this is something that can be improved within the plugin as other sections of Strapi (e.g. database) takes the updated configuration from register function.

upload plugin configuration before update image

Updating configuration in register function image

upload plugin configuration after update image

When I try to upload a file, I get the following error

 error: request to https://testfromconfig.blob.core.windows.net/assets/assets/Banner_Balls_BG_208df81a98?comp=block&blockid= failed, reason: getaddrinfo ENOTFOUND testfromconfig.blob.core.windows.net

Many Thanks