fix wrong logic uploaded file
This commit is contained in:
@@ -46,7 +46,7 @@ export class UploadedFileSchema extends PothosSchema {
|
||||
description: 'The URL of the file.',
|
||||
resolve: async (file) => {
|
||||
return await this.minioService.updatePresignUrl(
|
||||
file.id,
|
||||
file.fileName,
|
||||
'files',
|
||||
file.fileUrl,
|
||||
)
|
||||
@@ -89,7 +89,10 @@ export class UploadedFileSchema extends PothosSchema {
|
||||
if (!file) {
|
||||
throw new Error('File not found')
|
||||
}
|
||||
const fileUrl = await this.minioService.getFileUrl(file.id, 'files')
|
||||
const fileUrl = await this.minioService.getFileUrl(
|
||||
file.fileName,
|
||||
'files',
|
||||
)
|
||||
if (!fileUrl) {
|
||||
throw new Error('Cannot retrieve file url')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user