fix upload
This commit is contained in:
@@ -42,18 +42,8 @@ export class UploadedFileSchema extends PothosSchema {
|
||||
nullable: false,
|
||||
description: 'The type of the file.',
|
||||
}),
|
||||
fileUrl: t.string({
|
||||
fileUrl: t.exposeString('fileUrl', {
|
||||
description: 'The URL of the file.',
|
||||
resolve: async (file, args, ctx) => {
|
||||
const fileUrl = await this.minioService.getFileUrl(
|
||||
file.fileName,
|
||||
'files',
|
||||
);
|
||||
if (!fileUrl) {
|
||||
return '';
|
||||
}
|
||||
return fileUrl;
|
||||
},
|
||||
}),
|
||||
uploadedAt: t.expose('uploadedAt', {
|
||||
type: 'DateTime',
|
||||
|
||||
Reference in New Issue
Block a user