Skip to content

Commit

Permalink
Change function name
Browse files Browse the repository at this point in the history
  • Loading branch information
neos1803 committed Aug 17, 2021
1 parent c5aa281 commit 0d5947d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
private uploadFileHelper({ createReadStream, encoding, filename, mimetype }: FileUpload): Promise<string> {
console.log(mimetype);
const fName = `${Date.now()}-file.${mimetype.split('/')[1]}`
const upload: Promise<string> = new Promise((resolve, reject) => createReadStream()
Expand Down

0 comments on commit 0d5947d

Please sign in to comment.