feat: 上传文件到minio
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { bucketName, minioClient } from '@/modules/minio.ts';
|
||||
|
||||
import { S3Error } from 'minio';
|
||||
const main = async () => {
|
||||
const res = await new Promise((resolve, reject) => {
|
||||
let res: any[] = [];
|
||||
@@ -24,4 +24,17 @@ const main = async () => {
|
||||
});
|
||||
console.log(res);
|
||||
};
|
||||
main();
|
||||
// main();
|
||||
|
||||
const main2 = async () => {
|
||||
try {
|
||||
const obj = await minioClient.statObject(bucketName, 'root/codeflow/0.0.1/README.md');
|
||||
|
||||
console.log(obj);
|
||||
} catch (e) {
|
||||
console.log('', e.message, '\n\r', e.code);
|
||||
// console.error(e);
|
||||
}
|
||||
};
|
||||
|
||||
main2();
|
||||
|
||||
Reference in New Issue
Block a user