Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rename

Manav Rathi1501e055a916
diff --git a/web/apps/photos/src/services/upload/uploadService.ts b/web/apps/photos/src/services/upload/uploadService.ts
index 093fd5b2c8..e905bf0098 100644
--- a/web/apps/photos/src/services/upload/uploadService.ts
+++ b/web/apps/photos/src/services/upload/uploadService.ts
@@ -809,9 +809,9 @@ async function tryExtractImageMetadata(
): Promise<ParsedExtractedMetadata> {
let file: File;
if (typeof uploadItem == "string" || Array.isArray(uploadItem)) {
- // The library we use for extracting Exif from images, exifr, doesn't
- // support streams. But unlike videos, for images it is reasonable to
- // read the entire stream into memory here.
+ // The library we use for extracting Exif from images, ExifReader,
+ // doesn't support streams. But unlike videos, for images it is
+ // reasonable to read the entire stream into memory here.
const { response } = await readStream(ensureElectron(), uploadItem);
const path = typeof uploadItem == "string" ? uploadItem : uploadItem[1];
file = new File([await response.arrayBuffer()], basename(path), {
diff --git a/web/packages/new/photos/services/exif.ts b/web/packages/new/photos/services/exif.ts
index da718c5bee..19b6c787c3 100644
--- a/web/packages/new/photos/services/exif.ts
+++ b/web/packages/new/photos/services/exif.ts
@@ -9,7 +9,7 @@ export const wipNewLib = async () => isDevBuild && (await isInternalUser());
export const cmpNewLib = (
oldLib: ParsedExtractedMetadata,
- newLib: ParsedMetadata,
+ newLib: ExtractedExif,
) => {
if (
oldLib.width == newLib.width &&
@@ -34,7 +34,7 @@ export const cmpNewLib = (
* be attached to an {@link EnteFile} allows us to perform operations using
* these attributes without needing to re-download the original image.
*/
-interface ParsedMetadata {
+interface ExtractedExif {
/** The width of the image, in pixels. */
width?: number;
/** The height of the image, in pixels. */
@@ -76,7 +76,7 @@ export const extractExif = async (file: File) => {
const creationDate = parseCreationDate(tags);
const dimensions = parseDimensions(tags);
- const metadata: ParsedMetadata = dimensions ?? {};
+ const metadata: ExtractedExif = dimensions ?? {};
if (creationDate) metadata.creationTime = creationDate.getTime() * 1000;
if (location) metadata.location = location;
return metadata;