fix: minio

This commit is contained in:
louis 2024-03-27 14:18:11 +08:00
parent ce54da72c9
commit c9437d7c67
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import { isEmpty } from 'lodash';
import { ConfigKeyPaths } from '~/config';
import { generateRandomValue } from '~/utils';
import { SFileInfo, SFileInfoDetail, SFileList } from './manage.class';
import * as Minio from 'Minio';
import { InjectMinio } from 'nestjs-minio';
import { Client } from 'minio';
@ -29,7 +28,7 @@ export class NetDiskManageService {
return new Promise<SFileList>((resolve, reject) => {
try {
const fileStream = this.minioClient.listObjects(this.ossConfig.bucket, prefix, false);
this.readStreamData<Minio.BucketItem>(fileStream).then(respBody => {
this.readStreamData<any>(fileStream).then(respBody => {
console.log(respBody);
const dirs = respBody.filter(item => 'prefix' in item).map(item => item.prefix);
const files = respBody.filter(item => !('prefix' in item));