In this document, you’ll learn what a file service is in Medusa.
A file service defines how files are stored in the Medusa Backend. Those files include products’ images and files used to import or export data.
Medusa Backend includes a default file service that acts as a placeholder, but does not actually perform any storage functionalities. So, you must either install one of the existing file-service plugins, such as MinIO or S3, or create your own file service if you want to utilize storage functionalities.
AbstractFileService class from the core
@medusajs/medusa package. By extending this class, the file service must implement the necessary methods that take care of general upload and download functionalities. The Medusa Backend then uses these methods when necessary, for example, when a product image is uploaded.
Developers can create a custom file service with the desired functionality directly within the Medusa Core, in a plugin, or in a module.
Learn how to create a file service.