diff --git a/src/utils/minio.ts b/src/utils/minio.ts index 48f6a3a..4216126 100644 --- a/src/utils/minio.ts +++ b/src/utils/minio.ts @@ -18,6 +18,10 @@ export async function listFile(path: string) { }); } +export async function getFile(path: string, exp = 60 * 60) { + return await minio.presignedGetObject(MINIO_BUCKET, path, exp); +} + export async function deleteFile(path: string) { await minio.removeObject(MINIO_BUCKET, path, { forceDelete: true }); }