medusa-file-azure-storage
v0.0.3
Published
Azure storage file connector for Medusa
Downloads
6
Maintainers
Readme
Azure storage
Store uploaded files to your Medusa backend on S3.
Plugin Documentation | Medusa Website | Medusa Repository
Features
- Store product images on Azure Storage
- Support for importing and exporting data through CSV files, such as Products or Prices.
- Support for Bucket Policies and User Permissions.
Prerequisites
How to Install
1. Run the following command in the directory of the Medusa backend:
npm install medusa-file-azure-storage
2. Set the following environment variables in .env
:
AZURE_STORAGE_CONNECTION_STRING=<YOUR_AZURE_STORAGE_CONNECTION_STRING>
AZURE_STORAGE_PUBLIC_CONTAINER_NAME=<YOUR_PUBLIC_CONTAINER>
AZURE_STORAGE_PROTECTED_CONTAINER_NAME=<YOUR_PROTECTED_CONTAINER>
3. In medusa-config.js
add the following at the end of the plugins
array:
const plugins = [
// ...
{
resolve: `medusa-file-azure-storage`,
options: {
AZURE_STORAGE_CONNECTION_STRING: process.env.AZURE_STORAGE_CONNECTION_STRING,
AZURE_STORAGE_PUBLIC_CONTAINER_NAME: process.env.AZURE_STORAGE_PUBLIC_CONTAINER_NAME,
AZURE_STORAGE_PROTECTED_CONTAINER_NAME: process.env.AZURE_STORAGE_PROTECTED_CONTAINER_NAME
},
},
]
Test the Plugin
1. Run the following command in the directory of the Medusa backend to run the backend:
npm run start
2. Upload an image for a product using the admin dashboard or using the Admin APIs.