Skip to content

Commit 0e23e4d

Browse files
committed
Add example for MinIO driver in comment
1 parent bfc7e8a commit 0e23e4d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/flask/app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ def serve_files(storage, file_id):
106106
os.makedirs("./upload_dir", 0o777, exist_ok=True)
107107
driver = get_driver(Provider.LOCAL)("./upload_dir")
108108

109+
"""
110+
Or with MinIO:
111+
112+
cls = get_driver(Provider.MINIO)
113+
driver = cls("minioadmin", "minioadmin", secure=False, host="127.0.0.1", port=9000)
114+
"""
115+
109116
with contextlib.suppress(ContainerAlreadyExistsError):
110117
driver.create_container(container_name="images")
111118

0 commit comments

Comments
 (0)