Plugin enabling image uploading to azure storage from strapi.
These 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.
- Node 10+
- npm 6+
- [email protected]+
Inside your strapi project run the following
yarn add strapi-provider-upload-azure-storage
# or
npm install strapi-provider-upload-azure-storage
With a stable release of Strapi 3.0.0, the configuration was moved to a JavaScript file. Official documentation here.
To enable the provider, create or edit the file at ./config/plugins.js
.
This is an example plugins.js file for Azure storage:
module.exports = ({ env }) => ({
upload: {
provider: 'azure-storage',
providerOptions: {
azure: {
account: env('STORAGE_ACCOUNT'),
accountKey: env('STORAGE_ACCOUNT_KEY'),
serviceBaseURL: env('STORAGE_URL'),
containerName: env('STORAGE_CONTAINER_NAME'),
defaultPath: env('STORAGE_DEFAULT_PATH') || 'assets',
maxConcurrent: 10
},
imgix: {
serviceBaseURL: env('IMAGE_CDN_URL'),
}
}
}
});
serviceBaseURL
is optional, it is useful when connecting to Azure Storage API compatible services, like the official emulator Azurite. serviceBaseURL
would then look like http://localhost:10000/your-storage-account-key
.
When serviceBaseURL
is not provided, default https://${account}.blob.core.windows.net
will be used.
Contributions are welcome
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Jake Feldman - Initial work - jakeFeldman
This project is licensed under the MIT License - see the LICENSE.md file for details
- strapi.io
- Azure