{"_id":"@dashart/strapi-provider-upload-azure-storage","_rev":"4-ff44da3ecfb74f42aab754a91f67a485","name":"@dashart/strapi-provider-upload-azure-storage","dist-tags":{"latest":"3.5.0"},"versions":{"3.4.1":{"name":"@dashart/strapi-provider-upload-azure-storage","version":"3.4.1","keywords":[],"license":"MIT","_id":"@dashart/strapi-provider-upload-azure-storage@3.4.1","maintainers":[{"name":"dashart-ke","email":"k.elstner@dashart.de"}],"homepage":"http://strapi.io","bugs":{"url":"https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage/issues"},"dist":{"shasum":"5d96e7a8090650d42c87935427dbcca7dee4f1b8","tarball":"https://registry.npmjs.org/@dashart/strapi-provider-upload-azure-storage/-/strapi-provider-upload-azure-storage-3.4.1.tgz","fileCount":27,"integrity":"sha512-DP2x16LW5NcMPekrQNhUqKa3QBo62/UZU5T47Qp9vCJtKgf+XcnxdFmYkbyh04sf+m5jkJMSIO3SOf4i05eFGA==","signatures":[{"sig":"MEUCIQCN+h4VYeliYuFyh9Bscp43GR/no6Eq6+NEil4TADvEcwIgCLhYdJHAnXjSf4gb316LjrYUgjVHIHhe7GAJyRtd+4E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104867},"main":"dist/index.js","types":"./dist/index.d.ts","strapi":{"isProvider":true},"gitHead":"2eeb748966fa97ccc6ee02fb86e0fc305427c9b9","scripts":{"lint":"eslint . --ext .js,.ts","build":"tsc -p tsconfig.json","lint:fix":"eslint . --ext .js,.ts --fix","prebuild":"rm -rf dist","prepublishOnly":"yarn build"},"_npmUser":{"name":"dashart-ke","email":"k.elstner@dashart.de"},"repository":{"url":"git+https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage.git","type":"git"},"_npmVersion":"10.8.2","description":"Fork of original strapi plugin:   [(https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/]((https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/)   by: [jakeFeldman](https://github.com/jakeFeldman)","directories":{"lib":"./lib"},"_nodeVersion":"18.20.6","dependencies":{"@azure/identity":"^4.7.0","@azure/storage-blob":"^12.26.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.34.0","prettier":"^2.8.4","typescript":"^5.8.2","@types/node":"^18.13.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.51.0","eslint-plugin-unused-imports":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.51.0","eslint-plugin-simple-import-sort":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/strapi-provider-upload-azure-storage_3.4.1_1741611488586_0.44548576264936157","host":"s3://npm-registry-packages-npm-production"}},"3.4.3":{"name":"@dashart/strapi-provider-upload-azure-storage","version":"3.4.3","keywords":[],"license":"MIT","_id":"@dashart/strapi-provider-upload-azure-storage@3.4.3","maintainers":[{"name":"dashart-ke","email":"k.elstner@dashart.de"}],"homepage":"http://strapi.io","bugs":{"url":"https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage/issues"},"dist":{"shasum":"8fbf8735bc8e233185e2a293e2ad31ff0a4fb351","tarball":"https://registry.npmjs.org/@dashart/strapi-provider-upload-azure-storage/-/strapi-provider-upload-azure-storage-3.4.3.tgz","fileCount":13,"integrity":"sha512-seh8ASYTM4CQ0omlVYE89JXn8U4tfu0nWe8rxKx90YvUM8mMyfG3SZxBQd9hF9oO7mGbgOuqHVJ8Sjvi+6MInw==","signatures":[{"sig":"MEUCIFYbOjm2hEPNGG7anY3BiNaieep40G5/CF4/yS5pugiEAiEA52W348qREkQqAX96oqYh0+JlUl2tDHbWF2H/EviEPRM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCi8onUo1W19DAM41c19QjHbqGw5AhKk4+2OF/G5pmcoQIgUmlm3NcS4YQjKV4fW6kVYNYfnTqGyYdhVjeoudCj66k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46310},"main":"dist/index.js","types":"./dist/index.d.ts","strapi":{"isProvider":true},"gitHead":"d5480443ed788f17b01bed97e6df012b4c8c8a61","scripts":{"lint":"eslint . --ext .js,.ts","test":"vitest run","build":"tsc -p tsconfig.json","lint:fix":"eslint . --ext .js,.ts --fix","prebuild":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dashart-ke","email":"k.elstner@dashart.de"},"repository":{"url":"git+https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage.git","type":"git"},"_npmVersion":"11.13.0","description":"Fork of original strapi plugin:   [(https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/]((https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/)   by: [jakeFeldman](https://github.com/jakeFeldman)","directories":{"lib":"./lib"},"_nodeVersion":"24.16.0","dependencies":{"@azure/identity":"^4.7.0","@azure/storage-blob":"^12.26.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.34.0","vitest":"^2.1.9","prettier":"^2.8.4","typescript":"^5.8.2","@types/node":"^18.13.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.51.0","eslint-plugin-unused-imports":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.51.0","eslint-plugin-simple-import-sort":"^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/strapi-provider-upload-azure-storage_3.4.3_1790685234726_0.4964544058231073","host":"s3://npm-registry-packages-npm-production"}},"3.5.0":{"_id":"@dashart/strapi-provider-upload-azure-storage@3.5.0","bugs":{"url":"https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage/issues"},"dist":{"shasum":"ed1faccaf68c9c5222f9c24cdeb5a9082a2ec34f","tarball":"https://registry.npmjs.org/@dashart/strapi-provider-upload-azure-storage/-/strapi-provider-upload-azure-storage-3.5.0.tgz","fileCount":11,"integrity":"sha512-A7xDgCyUdiNIGUXqi6DuvfZCRsc1vWAs+3DrLIIlAee1J9ZeL8bU6f76Svn0LgKO0NIc0o56sGaxiniEcfEn/A==","signatures":[{"sig":"MEQCIFX4oO8FLlzKCcaUA/ms4i7gyArHcgwM2P8pxbftMtiBAiB4zzp6puyywkfaQR/E+tzpzNsCp2iUT7+fmjrNAdXB6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAOlSFzXNyQdSYERcXR9IafTYVY4eUUjg0ud7Lv76lFtAiAcC28F+0ncEch3po71GUfAMoiH8mCrIjn48JzfGYmssQ=="}],"unpackedSize":56763},"main":"dist/index.js","name":"@dashart/strapi-provider-upload-azure-storage","types":"./dist/index.d.ts","strapi":{"isProvider":true},"gitHead":"c79da99d64afd9e5bac89e51e332770b63a4ea3b","license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.json","lint:fix":"eslint . --fix","prebuild":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run build"},"version":"3.5.0","_npmUser":{"name":"dashart-ke","email":"k.elstner@dashart.de"},"homepage":"http://strapi.io","keywords":[],"repository":{"url":"git+https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage.git","type":"git"},"_npmVersion":"11.13.0","description":"Fork of original strapi plugin:   [(https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/]((https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/)   by: [jakeFeldman](https://github.com/jakeFeldman)","directories":{"lib":"./lib"},"maintainers":[{"name":"dashart-ke","email":"k.elstner@dashart.de"}],"_nodeVersion":"24.16.0","dependencies":{"@azure/identity":"^4.13.3","@azure/storage-blob":"^12.34.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.11.0","vitest":"^5.0.2","globals":"^17.12.0","prettier":"^3.9.9","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^26.6.3","typescript-eslint":"^8.71.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@typescript-eslint/parser":"^8.71.0","eslint-plugin-unused-imports":"^4.4.1","@typescript-eslint/eslint-plugin":"^8.71.0","eslint-plugin-simple-import-sort":"^14.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/strapi-provider-upload-azure-storage_3.5.0_1790687632243_0.9783164123861925"}}},"time":{"created":"2025-03-10T12:58:08.584Z","modified":"2026-09-29T13:13:52.516Z","3.4.1":"2025-03-10T12:58:08.771Z","3.4.3":"2026-09-29T12:33:54.808Z","3.5.0":"2026-09-29T13:13:52.350Z"},"bugs":{"url":"https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage/issues"},"license":"MIT","homepage":"http://strapi.io","keywords":[],"repository":{"url":"git+https://gitlab.com/dashart/public-npm-libraries/strapi-provider-upload-azure-storage.git","type":"git"},"description":"Fork of original strapi plugin:   [(https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/]((https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/)   by: [jakeFeldman](https://github.com/jakeFeldman)","maintainers":[{"name":"dashart-ke","email":"k.elstner@dashart.de"}],"readme":"# Strapi Provider Upload Azure Storage\n\nFork of original strapi plugin:  \n[(https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/]((https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/)  \nby:\n[jakeFeldman](https://github.com/jakeFeldman)\n\n\nFork needed because of missing publish of releases.\nJake is searching for supporters, sadly I did not have the time.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\n- strapi@4.0.0+\n\n### Installing\n\nInside your strapi project run the following\n\n```sh\nyarn add @dashart/strapi-provider-upload-azure-storage\n\n# or\n\nnpm install @dashart/strapi-provider-upload-azure-storage\n```\n\n## Usage\n\nTo enable the provider, create or edit the file at `./config/plugins.js`.\n\nThis is an example `plugins.js` file for Azure storage:\n\n```js\nmodule.exports = ({ env }) => ({\n  upload: {\n    config: {\n      provider: \"@dashart/strapi-provider-upload-azure-storage\",\n      providerOptions: {\n        authType: env(\"STORAGE_AUTH_TYPE\", \"default\"),\n        account: env(\"STORAGE_ACCOUNT\"),\n        accountKey: env(\"STORAGE_ACCOUNT_KEY\"),//either account key or sas token is enough to make authentication \n        sasToken: env(\"STORAGE_ACCOUNT_SAS_TOKEN\"),\n        serviceBaseURL: env(\"STORAGE_URL\"), // optional\n        containerName: env(\"STORAGE_CONTAINER_NAME\"),\n        createContainerIfNotExist: env(\"STORAGE_CREATE_CONTAINER_IF_NOT_EXIST\", 'false'), // optional\n        publicAccessType: env(\"STORAGE_PUBLIC_ACCESS_TYPE\"), // optional ('blob' | 'container')\n        defaultPath: \"assets\",\n        cdnBaseURL: env(\"STORAGE_CDN_URL\"), // optional\n        defaultCacheControl: env(\"STORAGE_CACHE_CONTROL\"), // optional\n        removeContainerName: env(\"REMOVE_CONTAINER_NAME\"), // optional, if you want to remove container name from the URL\n      },\n    },\n  },\n});\n\n// For using azure identities, the correct authType is 'msi' or (provide it in the environment variable)\n// clientId is used for Azure User-Assigned Identity access. If not provided, system-assigned managed identity is used instead\n// RBAC Role Storage Blob Data Contributor required for MSI   \n\nmodule.exports = ({ env }) => ({\n  upload: {\n    config: {\n      provider: \"@dashart/strapi-provider-upload-azure-storage\",\n      providerOptions: {\n        authType: 'msi',\n        account: env(\"STORAGE_ACCOUNT\"),\n        clientId: env(\"STORAGE_AZURE_CLIENT_ID\"), // optional\n        serviceBaseURL: env(\"STORAGE_URL\"), // optional\n        containerName: env(\"STORAGE_CONTAINER_NAME\"),\n        createContainerIfNotExist: env(\"STORAGE_CREATE_CONTAINER_IF_NOT_EXIST\", 'false'), // optional\n        publicAccessType: env(\"STORAGE_PUBLIC_ACCESS_TYPE\"), // optional ('blob' | 'container')\n        defaultPath: \"assets\",\n        cdnBaseURL: env(\"STORAGE_CDN_URL\"), // optional\n        defaultCacheControl: env(\"STORAGE_CACHE_CONTROL\"), // optional\n        removeContainerName: env(\"REMOVE_CONTAINER_NAME\"), // optional, if you want to remove container name from the URL\n      },\n    },\n  },\n});\n\n```\n\n| Property                  | Required                                      | Description                                                                                           |\n| ------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------|\n| authType                  | true                                          | Whether to use a SAS key (\"default\") or an identity (\"msi\")                                           |\n| account                   | true                                          | Azure account name                                                                                    |\n| accountKey                | if 'authType 'default'                        | Secret access key                                                                                     |\n| clientId                  | false (consumed if 'authType 'msi')           | Azure user-assigned identity client ID. If not provided, system-assigned managed identity ID is used  |\n| sasToken                  | false                                         | SAS Token, either accountKey or SASToken is required if 'authType is 'default'                        |\n| serviceBaseURL            | false                                         | Base service URL to be used, optional. Defaults to `https://${account}.blob.core.windows.net`         |\n| containerName             | true                                          | Container name                                                                                        |\n| createContainerIfNotExist | false                                         | Attempts to create the container if not existing. Must be one of 'true' or any string                 |\n| publicAccessType          | false (param for 'createContainerIfNotExist') | Sets the public access of a newly created container to one of 'blob' or 'container'                   |\n| defaultPath               | true                                          | The path to use when there is none being specified. Defaults to `assets`                              |\n| cdnBaseURL                | false                                         | CDN base url                                                                                          |\n| defaultCacheControl       | false                                         | Cache-Control header value for all uploaded files                                                     |\n| removeContainerName       | false                                         | Set to true, to remove container name from azure URL (`removeCN` is accepted as a deprecated alias)  |\n\n\n### Security Middleware Configuration\n\nDue to the default settings in the Strapi Security Middleware you will need to modify the contentSecurityPolicy settings to properly see thumbnail previews in the Media Library. You should replace strapi::security string with the object bellow instead as explained in the middleware configuration documentation.\n\nTo allow the azure storage content to be displayed, edit the file at `./config/middlewares.js`.\nYou should replace the `strapi::security` string with the object below instead, see the [Middlewares configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html) documentation for more details.\n\n`./config/middlewares.js`\n\n```js\nmodule.exports = [\n  // ...\n  {\n    name: \"strapi::security\",\n    config: {\n      contentSecurityPolicy: {\n        useDefaults: true,\n        directives: {\n          \"connect-src\": [\"'self'\", \"https:\"],\n          \"img-src\": [\n            \"'self'\",\n            \"data:\",\n            \"blob:\",\n            \"dl.airtable.com\", // Required for Strapi < 4.10.6, you can remove it otherwise\n            \"https://market-assets.strapi.io\", // Required for Strapi >= 4.10.6, you can remove it otherwise\n            /**\n             * Note: If using a STORAGE_URL replace `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net` w/ process.env.STORAGE_URL\n             * If using a CDN URL make sure to include that url in the CSP headers process.env.STORAGE_CDN_URL\n             */\n            `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net`,\n          ],\n          \"media-src\": [\n            \"'self'\",\n            \"data:\",\n            \"blob:\",\n            \"dl.airtable.com\", // Required for Strapi < 4.10.6, you can remove it otherwise\n            /**\n             * Note: If using a STORAGE_URL replace `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net` w/ process.env.STORAGE_URL\n             * If using a CDN URL make sure to include that url in the CSP headers process.env.STORAGE_CDN_URL\n             */\n            `https://${process.env.STORAGE_ACCOUNT}.blob.core.windows.net`,\n\n          ],\n          upgradeInsecureRequests: null,\n        },\n      },\n    },\n  },\n  // ...\n];\n```\n\n`serviceBaseURL` is optional, it is useful when connecting to Azure Storage API compatible services, like the official emulator [Azurite](https://github.com/Azure/Azurite/). `serviceBaseURL` would then look like `http://localhost:10000/your-storage-account-key`.  \nWhen `serviceBaseURL` is not provided, default `https://${account}.blob.core.windows.net` will be used.\n\n`createContainerIfNotExist` can also be useful when working with [Azurite](https://github.com/Azure/Azurite/) as the tool provides very little by way of startup scripting.\n\n`cdnBaseURL` is optional, it is useful when using CDN in front of your storage account. Images will be returned with the CDN URL instead of the storage account URL.\n\n`defaultCacheControl` is optional. It is useful when you want to allow clients to use a cached version of the file. Azure storage will return this value in the [`Cache-Control` HTTP-header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control?retiredLocale=de) of the response. \n\n`removeContainerName` is optional. Some azure account configurations are such that they exclude 'container name' from the URL at which data is saved. It is by default set to false, if you want to remove container name from URL, set it to 'true'. The legacy name `removeCN` is still accepted as an alias, but deprecated.\n\n## Contributing\n\nContributions are welcome\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/jakeFeldman/strapi-provider-upload-azure-storage/releases).\n\n## Authors\n\n* **Jake Feldman** - *Initial work* - [jakeFeldman](https://github.com/jakeFeldman)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n* strapi.io\n* Azure\n","readmeFilename":"README.md"}