Skip to main content

Minio Storage Driver for Masonite

Project description

Project description

What is Minio-Driver?

It's an extra storage driver support for Minio in masonite 4.


Install package using pip:

pip install minio-driver

Add provider inside config/

from minio_driver.MinioProvider import MinioProvider

    # Application Providers

Storage Config

Add following configuration inside config/ after "s3": {...},

"minio": {
    "driver": "minio",
    "client": env("MINIO_CLIENT"),
    "secret": env("MINIO_SECRET"),
    "bucket": env("MINIO_BUCKET"),
    "path": env("MINIO_ENDPOINT"),

Add following keys in .env.


Update the storage driver value to minio in .env



from masonite.controllers import Controller
from masonite.filesystem import Storage
from masonite.request import Request

class YourController(Controller):

    def your_function(self, request: Request, storage: Storage):
        file = request.input('file')

        # storing file
        path = storage.disk("minio").put_file('your_file_directory', file)

        # getting file_url from storage
        file_url = storage.disk("minio").get_secure_url(path)
        return file_url

Enjoy ;)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minio_driver-0.1.6.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

minio_driver-0.1.6-py3-none-any.whl (5.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page