run eslint
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
import { Module, Global } from '@nestjs/common';
|
||||
import { MinioService } from './minio.service';
|
||||
import { NestMinioModule } from 'nestjs-minio';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
@Global()
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot(),
|
||||
NestMinioModule.register({
|
||||
endPoint: process.env.MINIO_ENDPOINT ?? '10.0.27.1',
|
||||
accessKey: process.env.MINIO_ACCESS_KEY ?? 'minioadmin',
|
||||
secretKey: process.env.MINIO_SECRET_KEY ?? 'minioadmin',
|
||||
useSSL: true,
|
||||
isGlobal: true,
|
||||
}),
|
||||
],
|
||||
providers: [MinioService],
|
||||
|
||||
@@ -12,7 +12,8 @@ export class MinioService {
|
||||
) {}
|
||||
|
||||
async uploadFile(file: FileUpload, category: string) {
|
||||
const { mimetype, createReadStream, encoding } = await file;
|
||||
// sonar ignore next
|
||||
const { mimetype, createReadStream } = await file;
|
||||
const filename = this.fileName();
|
||||
const Name = `${category}/${filename}`;
|
||||
const fileBuffer = createReadStream();
|
||||
|
||||
Reference in New Issue
Block a user