npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

Iโ€™ve always been into building performant and accessible sites, but lately Iโ€™ve been taking it extremely seriously. So much so that Iโ€™ve been building a tool to help me optimize and monitor the sites that I build to make sure that Iโ€™m making an attempt to offer the best experience to those who visit them. If youโ€™re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, ๐Ÿ‘‹, Iโ€™m Ryan Hefnerย  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If youโ€™re interested in other things Iโ€™m working on, follow me on Twitter or check out the open source projects Iโ€™ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soonโ€“ish.

Open Software & Tools

This site wouldnโ€™t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you ๐Ÿ™

ยฉ 2026 โ€“ย Pkg Stats / Ryan Hefner

@vymalo/medusa-minio

v1.0.10

Published

๐Ÿ—„๏ธ Seamless MinIO file storage integration for MedusaJS - Self-hosted, S3-compatible object storage

Readme

MedusaJS Minio File Storage Provider

๐Ÿ—„๏ธ Seamless MinIO file storage integration for MedusaJS - Self-hosted, S3-compatible object storage

๐ŸŒŸ Features

  • Direct integration with MinIO object storage
  • Support for public and private buckets
  • Configurable CDN and upload options
  • Flexible file key and metadata generation
  • Environment variable-driven configuration

๐Ÿ—๏ธ Architecture Overview

graph TD
    A[MedusaJS] -->|File Upload| B[MinIO Storage]
    B -->|Public Files| C[CDN]
    B -->|Private Files| D[Secure Bucket]
    
    subgraph File Management
    Upload[File Upload]
    Download[Presigned URLs]
    Metadata[Custom Metadata]
    end

Key Capabilities

  • Self-hosted object storage
  • S3-compatible API
  • Secure file management
  • Flexible deployment options

๐Ÿ“ฆ Installation

Install the package using npm:

npm install @vymalo/medusa-minio

Or using yarn:

yarn add @vymalo/medusa-minio

๐Ÿš€ Configuration

Plugin Setup

modules: [
  {
    resolve: '@medusajs/medusa/file',
    options: {
      providers: [
        {
          resolve: '@vymalo/medusa-minio',
          id: 'minio',
          options: {
            endpoint: process.env.MINIO_ENDPOINT,
            cdn_url: process.env.MINIO_CDN_URL,
            bucket: process.env.MINIO_BUCKET,
            private_bucket: process.env.MINIO_PRIVATE_BUCKET 
              || process.env.MINIO_BUCKET,
            access_key_id: process.env.MINIO_ACCESS_KEY,
            secret_access_key: process.env.MINIO_SECRET_KEY,
          },
        },
      ],
    },
  },
]

๐Ÿ”ง Advanced Configuration Options

interface MinioOptions {
  // Required Basic Configuration
  endpoint: string;        // MinIO server endpoint
  cdn_url: string;         // CDN URL for public files
  bucket: string;          // Default public bucket
  access_key_id: string;   // MinIO access key
  secret_access_key: string; // MinIO secret key

  // Optional Advanced Settings
  private_bucket?: string;  // Separate private bucket
  download_url_duration?: number; // Presigned download URL expiry
  upload_url_duration?: number;   // Presigned upload URL expiry

  // Customization Hooks
  uploadMetadata?: (file: ProviderUploadFileDTO | ProviderGetPresignedUploadUrlDTO) => ItemBucketMetadata;  // Custom metadata generator
  buildKey?: (file: ProviderUploadFileDTO | ProviderGetPresignedUploadUrlDTO) => string;  // Custom file key generator
}

Customization Examples

Custom File Key Generation

buildKey: (file) => {
  // Generate custom file path/key
  return `uploads/${new Date().toISOString()}/${file.originalName}`;
}

Custom Metadata

uploadMetadata: (file) => ({
  'x-amz-meta-my-key': 'custom-value',
  'content-type': file.mimetype
})

๐ŸŒ Environment Variables

Required Environment Variables:

  • MINIO_ENDPOINT: MinIO server URL
  • MINIO_CDN_URL: CDN endpoint for public files
  • MINIO_BUCKET: Default public bucket name
  • MINIO_ACCESS_KEY: MinIO access key
  • MINIO_SECRET_KEY: MinIO secret key

Optional Environment Variables:

  • MINIO_PRIVATE_BUCKET: Separate private bucket name

๐Ÿ›ก๏ธ Security Considerations

  • Use strong, unique access keys
  • Implement bucket-level access controls
  • Rotate credentials regularly
  • Use HTTPS for all communications

๐Ÿค Contributing

Contributions are welcome! Please submit pull requests or open issues.

๐Ÿ“„ License

Check the license

๐Ÿ”— Related Projects