From 47efa6a8e56e9ffde655f1a2dd62cc906cb285c4 Mon Sep 17 00:00:00 2001 From: Abhinav-grd Date: Wed, 18 Aug 2021 12:41:00 +0530 Subject: [PATCH] increase chunk size for exif parsing and just log and dont break on exif laod fail --- src/services/upload/exifService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/upload/exifService.ts b/src/services/upload/exifService.ts index 727445dbb..82cc4aa2f 100644 --- a/src/services/upload/exifService.ts +++ b/src/services/upload/exifService.ts @@ -6,7 +6,7 @@ import { NULL_LOCATION, Location } from './metadataService'; const SOUTH_DIRECTION = 'S'; const WEST_DIRECTION = 'W'; const EXIF_HAVING_TYPES = new Set(['jpeg', 'jpg', 'tiff']); -const CHUNK_SIZE_FOR_EXIF_READING = 4100; +const CHUNK_SIZE_FOR_EXIF_READING = 4 * 1024 * 1024; interface ParsedEXIFData { location: Location; creationTime: number; @@ -35,7 +35,7 @@ export async function getExifData( }; } catch (e) { logError(e, 'error reading exif data'); - throw e; + // ignore exif parsing errors } }