update minio endpoint
This commit is contained in:
@@ -10,8 +10,7 @@ import { ConfigModule } from '@nestjs/config';
|
||||
endPoint: process.env.MINIO_ENDPOINT ?? '10.0.27.1',
|
||||
accessKey: process.env.MINIO_ACCESS_KEY ?? 'minioadmin',
|
||||
secretKey: process.env.MINIO_SECRET_KEY ?? 'minioadmin',
|
||||
useSSL: false,
|
||||
port: 9000,
|
||||
useSSL: true,
|
||||
}),
|
||||
],
|
||||
providers: [MinioService],
|
||||
|
||||
@@ -28,12 +28,14 @@ export class MinioService {
|
||||
}
|
||||
|
||||
async getFileUrl(fileName: string, category: string) {
|
||||
return await this.minioClient.presignedUrl(
|
||||
const url = await this.minioClient.presignedUrl(
|
||||
'GET',
|
||||
this.configService.get('BUCKET_NAME') ?? 'epess',
|
||||
`${category}/${fileName}`,
|
||||
3600,
|
||||
);
|
||||
// replace the url with the url with actual url
|
||||
return url;
|
||||
}
|
||||
|
||||
async deleteFile(fileName: string) {
|
||||
|
||||
Reference in New Issue
Block a user