update minio service
This commit is contained in:
@@ -34,13 +34,19 @@ export class MinioService {
|
||||
if (!id) {
|
||||
return null;
|
||||
}
|
||||
let url = null;
|
||||
|
||||
const url = await this.minioClient.presignedUrl(
|
||||
'GET',
|
||||
this.configService.get('BUCKET_NAME') ?? 'epess',
|
||||
`${category}/${id}`,
|
||||
0,
|
||||
);
|
||||
try {
|
||||
url = await this.minioClient.presignedUrl(
|
||||
'GET',
|
||||
this.configService.get('BUCKET_NAME') ?? 'epess',
|
||||
`${category}/${id}`,
|
||||
60 * 60 * 24 * 7,
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
console.log(url);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user