From c4938d04e3c2b100d65fed5d3fcba75b95fa430b Mon Sep 17 00:00:00 2001 From: abhinav-grd Date: Sun, 12 Sep 2021 12:17:17 +0530 Subject: [PATCH] updates code to fit with new getExif function --- src/services/upload/metadataService.ts | 3 +-- src/services/upload/uploadService.ts | 2 -- src/services/upload/uploader.ts | 1 - src/utils/common/errorUtil.ts | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services/upload/metadataService.ts b/src/services/upload/metadataService.ts index 5bfee0906..4f21b625c 100644 --- a/src/services/upload/metadataService.ts +++ b/src/services/upload/metadataService.ts @@ -28,11 +28,10 @@ const NULL_PARSED_METADATA_JSON: ParsedMetaDataJSON = { }; export async function extractMetadata( - worker, receivedFile: globalThis.File, fileTypeInfo: FileTypeInfo ) { - const { location, creationTime } = await getExifData(worker, receivedFile); + const { location, creationTime } = await getExifData(receivedFile); const extractedMetadata: MetadataObject = { title: receivedFile.name, diff --git a/src/services/upload/uploadService.ts b/src/services/upload/uploadService.ts index b7c566ed7..156bd0d34 100644 --- a/src/services/upload/uploadService.ts +++ b/src/services/upload/uploadService.ts @@ -127,7 +127,6 @@ class UploadService { } async getFileMetadata( - worker: any, rawFile: File, collection: Collection, fileTypeInfo: FileTypeInfo @@ -138,7 +137,6 @@ class UploadService { getMetadataMapKey(collection.id, originalName) ) ?? {}; const extractedMetadata: MetadataObject = await extractMetadata( - worker, rawFile, fileTypeInfo ); diff --git a/src/services/upload/uploader.ts b/src/services/upload/uploader.ts index 18e51c491..8259e2117 100644 --- a/src/services/upload/uploader.ts +++ b/src/services/upload/uploader.ts @@ -54,7 +54,6 @@ export default async function uploader( throw Error(CustomError.UNSUPPORTED_FILE_FORMAT); } metadata = await uploadService.getFileMetadata( - worker, rawFile, collection, fileTypeInfo diff --git a/src/utils/common/errorUtil.ts b/src/utils/common/errorUtil.ts index ec6784e34..26630e709 100644 --- a/src/utils/common/errorUtil.ts +++ b/src/utils/common/errorUtil.ts @@ -26,7 +26,6 @@ export enum CustomError { TYPE_DETECTION_FAILED = 'type detection failed', SIGNUP_FAILED = 'signup failed', FAV_COLLECTION_MISSING = 'favorite collection missing', - MISSING_EXIF_TAG = 'missing exif tags', } function parseUploadError(error: AxiosResponse) {