- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Local File Module Provider
The Local File Module Provider stores files uploaded to your Medusa application in the /uploads
directory.
Warning: The Local File Module Provider is only for development purposes. Use the S3 File Module Provider in production instead.
Register the Local File Module#
Note: The Local File Module Provider is registered by default in your application.
Add the module into the providers
array of the File Module:
Note: The File Module accepts one provider only.
1import { Modules } from "@medusajs/framework/utils"2 3// ...4 5module.exports = {6 // ...7 modules: [8 {9 resolve: "@medusajs/medusa/file",10 options: {11 providers: [12 {13 resolve: "@medusajs/medusa/file-local",14 id: "local",15 options: {16 // provider options...17 },18 },19 ],20 },21 },22 ],23}
Local File Module Options#
Option | Description | Default |
---|---|---|
| The directory to upload files to. Medusa exposes the content of the |
|
| The URL that serves the files. |
|
Was this page helpful?