1.0.1 • Published 3 months ago

@simoesmario/strapi-provider-upload-azure-storage v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@simoesmario/strapi-provider-upload-azure-storage

Custom Azure Blob Storage upload provider for Strapi v5, created by @simoesmario

Installation

npm install @simoesmario/strapi-provider-upload-azure-storage

Configuration

In config/plugins.js:

module.exports = ({ env }) => ({
    upload: {
        config: {
            provider: "@simoesmario/strapi-provider-upload-azure-storage",
            providerOptions: {
                account: env("STORAGE_ACCOUNT"),
                accountKey: env("STORAGE_ACCOUNT_KEY"),
                serviceBaseURL: env("STORAGE_URL"),
                containerName: env("STORAGE_CONTAINER_NAME"),
                cdnBaseURL: env("STORAGE_CDN_URL"),
                defaultPath: "assets",
                maxConcurrent: 10,
            },
        },
    },
    ...
});

In config/middlewares.js:

module.exports = [
    "strapi::security",
    {
        name: "strapi::security",
        config: {
        contentSecurityPolicy: {
            useDefaults: true,
            directives: {
            "img-src": [
                "'self'",
                "data:",
                "blob:",
                "https://market-assets.strapi.io",
                process.env.STORAGE_CDN_URL, 
            ],
            },
        },
        },
    },
    ...
];