From 0d5947dca49a05be7b9c08a53fe6e14e2948834f Mon Sep 17 00:00:00 2001 From: Ardi Date: Tue, 17 Aug 2021 12:33:28 +0700 Subject: [PATCH] Change function name --- src/app.resolver.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.resolver.ts b/src/app.resolver.ts index f188487..7d4ec16 100644 --- a/src/app.resolver.ts +++ b/src/app.resolver.ts @@ -10,11 +10,11 @@ export class AppResolver { @Args('file', { type: () => GraphQLUpload }) file: FileUpload ) { console.log(file) - const file_name = await this.uploadPhoto(file); + const file_name = await this.uploadFileHelper(file); return true; } - private uploadPhoto({ createReadStream, encoding, filename, mimetype }: FileUpload): Promise { + private uploadFileHelper({ createReadStream, encoding, filename, mimetype }: FileUpload): Promise { console.log(mimetype); const fName = `${Date.now()}-file.${mimetype.split('/')[1]}` const upload: Promise = new Promise((resolve, reject) => createReadStream()