increase chunk size for exif parsing and just log and dont break on exif laod fail
This commit is contained in:
parent
c9ffaf67b7
commit
47efa6a8e5
|
@ -6,7 +6,7 @@ import { NULL_LOCATION, Location } from './metadataService';
|
||||||
const SOUTH_DIRECTION = 'S';
|
const SOUTH_DIRECTION = 'S';
|
||||||
const WEST_DIRECTION = 'W';
|
const WEST_DIRECTION = 'W';
|
||||||
const EXIF_HAVING_TYPES = new Set(['jpeg', 'jpg', 'tiff']);
|
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 {
|
interface ParsedEXIFData {
|
||||||
location: Location;
|
location: Location;
|
||||||
creationTime: number;
|
creationTime: number;
|
||||||
|
@ -35,7 +35,7 @@ export async function getExifData(
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e, 'error reading exif data');
|
logError(e, 'error reading exif data');
|
||||||
throw e;
|
// ignore exif parsing errors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue