Local file storage
Store uploaded files to your Medusa backend locally.
Not suited for production environments
Features
- Store product images locally
Prerequisites
How to Install
1. Run the following command in the directory of the Medusa backend:
1npm install @tlukastee/file-local
2 . In Copy to clipboard
medusa-config.js
add the following at the end of the Copy to clipboardplugins
array:12345678910const plugins = [// ...{resolve: `@tlukastee/file-local`,options: {upload_dir: 'uploads/images', // optionalbackend_url: 'http://localhost:9000' // optional}},]
Test the Plugin
1. Run the following command in the directory of the Medusa backend to run the backend:
1npm run start
2. Upload an image for a product using the admin dashboard or using the Admin APIs.