Category

Other

Version

1.2.0

Last updated

Sep 27, 2023, 07:42:19 AMa year ago

Medusa file plugin for Azure Storage

Store uploaded files on Azure Storage

Features

  • Store product images
  • Enable import and export via csv

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:
npm install medusa-plugin-file-azure
2 . In Copy to clipboardmedusa-config.js add the following at the end of the Copy to clipboardplugins array:
const plugins = [
// ...
{
resolve: `medusa-plugin-file-azure`,
options: {
connectionString: "AZURE CONNECTION STRING",
protectedContainer: "private",
publicContainer: "public",
//if you want to customize expiry or access permissions on the sas link for private downloads, add an optionsbuilder of the type
//() => BlobGenerateSasUrlOptions"
//default is 30 days, read only
//sasOptionsBuilder: () => BlobGenerateSasUrlOptions { //implement }
}
},
]

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 upload a file for product import

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.