feat: add publish app

This commit is contained in:
2024-10-07 22:28:21 +08:00
parent 8beb65e637
commit 0fc580aa38
17 changed files with 1393 additions and 722 deletions

View File

@@ -1 +1,3 @@
import './list.ts';
export * from './module/get-minio-list.ts';

View File

@@ -53,3 +53,27 @@ export const getFileStat = async (prefix: string): Promise<any> => {
return null;
}
};
export const deleteFile = async (prefix: string): Promise<any> => {
try {
await minioClient.removeObject(bucketName, prefix, {
versionId: 'null',
forceDelete: true,
});
return true;
} catch (e) {
console.error('delete File Error not handle', e);
return false;
}
};
// 批量删除文件
export const deleteFiles = async (prefixs: string[]): Promise<any> => {
try {
await minioClient.removeObjects(bucketName, prefixs);
return true;
} catch (e) {
console.error('delete Files Error not handle', e);
return false;
}
};