Built by

Medusa

Category

Other

Version

0.0.3

Last updated

Aug 1, 2023, 08:10:26 AMa year ago

Azure storage

Store uploaded files to your Medusa backend on S3.

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 Copy to clipboard.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 Copy to clipboardmedusa-config.js add the following at the end of the Copy to clipboardplugins 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.

Additional Resources

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.