feat: image upload product service
This commit is contained in:
parent
615ba4e214
commit
8e1a32dcf3
3 changed files with 112 additions and 7 deletions
|
|
@ -22,6 +22,10 @@ export async function getFile(path: string, exp = 60 * 60) {
|
|||
return await minio.presignedGetObject(MINIO_BUCKET, path, exp);
|
||||
}
|
||||
|
||||
export async function setFile(path: string, exp = 6 * 60 * 60) {
|
||||
return await minio.presignedPutObject(MINIO_BUCKET, path, exp);
|
||||
}
|
||||
|
||||
export async function deleteFile(path: string) {
|
||||
await minio.removeObject(MINIO_BUCKET, path, { forceDelete: true });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue