Skip to content

Commit

Permalink
Add example for MinIO driver in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jowilf committed Jul 15, 2023
1 parent bfc7e8a commit 0e23e4d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ def serve_files(storage, file_id):
os.makedirs("./upload_dir", 0o777, exist_ok=True)
driver = get_driver(Provider.LOCAL)("./upload_dir")

"""
Or with MinIO:
cls = get_driver(Provider.MINIO)
driver = cls("minioadmin", "minioadmin", secure=False, host="127.0.0.1", port=9000)
"""

with contextlib.suppress(ContainerAlreadyExistsError):
driver.create_container(container_name="images")

Expand Down

0 comments on commit 0e23e4d

Please sign in to comment.