fix presigned url
This commit is contained in:
@@ -56,14 +56,12 @@ export class ResumeSchema extends PothosSchema {
|
||||
fileUrl: t.string({
|
||||
description: 'The URL of the resume file.',
|
||||
resolve: async (file, args, ctx) => {
|
||||
const fileUrl = await this.minioService.getFileUrl(
|
||||
// check if fileUrl is still valid
|
||||
return await this.minioService.getNewFileUrl(
|
||||
file.id,
|
||||
'resumes',
|
||||
file.fileUrl,
|
||||
);
|
||||
if (!fileUrl) {
|
||||
throw new Error('Cannot retrieve file url');
|
||||
}
|
||||
return fileUrl;
|
||||
},
|
||||
}),
|
||||
actualFileName: t.exposeString('actualFileName', {
|
||||
|
||||
Reference in New Issue
Block a user