π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
New home
Manav Rathi8b30d52e94ea
diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsxindex 00aecaaddd..3af4039713 100644--- a/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx+++ b/web/apps/photos/src/components/PhotoViewer/FileInfo/index.tsx@@ -2,8 +2,9 @@ import { EnteDrawer } from "@/base/components/EnteDrawer";import { Titlebar } from "@/base/components/Titlebar";import { nameAndExtension } from "@/base/file";import { FileType } from "@/media/file-type";+import type { ParsedMetadata } from "@/media/types/file";import { UnidentifiedFaces } from "@/new/photos/components/PeopleList";-import type { ParsedMetadata, RawExifTags } from "@/new/photos/services/exif";+import type { RawExifTags } from "@/new/photos/services/exif";import { isMLEnabled } from "@/new/photos/services/ml";import { EnteFile } from "@/new/photos/types/file";import { formattedByteSize } from "@/new/photos/utils/units";diff --git a/web/packages/media/file-type.ts b/web/packages/media/file-type.tsindex 3d34a3fe38..58083c97fa 100644--- a/web/packages/media/file-type.ts+++ b/web/packages/media/file-type.ts@@ -58,7 +58,6 @@ export const KnownFileTypeInfos: FileTypeInfo[] = [extension: "orf",mimeType: "image/x-olympus-orf",},-{fileType: FileType.image,extension: "crw",diff --git a/web/packages/media/types/file.ts b/web/packages/media/types/file.tsindex aed5f773ec..99bdd43638 100644--- a/web/packages/media/types/file.ts+++ b/web/packages/media/types/file.ts@@ -82,3 +82,42 @@ export interface Metadata {version?: number;deviceFolder?: string;}++/**+ * Metadata about a file extracted from various sources (like Exif) when+ * uploading it into Ente.+ *+ * Depending on the file type and the upload sequence, this data can come from+ * various places:+ *+ * - For images it comes from the Exif and other forms of metadata (XMP, IPTC)+ * embedded in the file.+ *+ * - For videos, similarly it is extracted from the metadata embedded in the+ * file using ffmpeg.+ *+ * - From various sidecar files (like metadata JSONs) that might be sitting+ * next to the original during an import.+ *+ * These bits then get distributed and saved in the various metadata fields+ * associated with an {@link EnteFile} (See: [Note: Metadatum]).+ *+ * The advantage of having them be attached to an {@link EnteFile} is that it+ * allows us to perform operations using these attributes without needing to+ * re-download the original image.+ *+ * The disadvantage is that it increases the network payload (anything attached+ * to an {@link EnteFile} comes back in the diff response), and thus latency and+ * local storage costs for all clients. Thus, we need to curate what gets+ * preseved within the {@link EnteFile}'s metadatum.+ */+export interface ParsedMetadata {+ /** The width of the image, in pixels. */+ width?: number;+ /** The height of the image, in pixels. */+ height?: number;+ /** The time when this photo was taken. */+ creationTime?: number;+ /** The GPS coordinates where the photo was taken. */+ location?: { latitude: number; longitude: number };+}diff --git a/web/packages/new/photos/services/exif.ts b/web/packages/new/photos/services/exif.tsindex 952d7a542b..61ecbe7b8b 100644--- a/web/packages/new/photos/services/exif.ts+++ b/web/packages/new/photos/services/exif.ts@@ -1,5 +1,6 @@import { isDevBuild } from "@/base/env";import log from "@/base/log";+import type { ParsedMetadata } from "@/media/types/file";import ExifReader from "exifreader";import type { ParsedExtractedMetadata } from "../types/metadata";import { isInternalUser } from "./feature-flags";@@ -26,45 +27,6 @@ export const cmpNewLib = (}};-/**- * Metadata about a file extracted from various sources (like Exif) when- * uploading it into Ente.- *- * Depending on the file type and the upload sequence, this data can come from- * various places:- *- * - For images it comes from the Exif and other forms of metadata (XMP, IPTC)- * embedded in the file.- *- * - For videos, similarly it is extracted from the metadata embedded in the- * file using ffmpeg.- *- * - From various sidecar files (like metadata JSONs) that might be sitting- * next to the original during an import.- *- * These bits then get distributed and saved in the various metadata fields- * associated with an {@link EnteFile} (See: [Note: Metadatum]).- *- * The advantage of having them be attached to an {@link EnteFile} is that it- * allows us to perform operations using these attributes without needing to- * re-download the original image.- *- * The disadvantage is that it increases the network payload (anything attached- * to an {@link EnteFile} comes back in the diff response), and thus latency and- * local storage costs for all clients. Thus, we need to curate what gets- * preseved within the {@link EnteFile}'s metadatum.- */-export interface ParsedMetadata {- /** The width of the image, in pixels. */- width?: number;- /** The height of the image, in pixels. */- height?: number;- /** The time when this photo was taken. */- creationTime?: number;- /** The GPS coordinates where the photo was taken. */- location?: { latitude: number; longitude: number };-}-/*** Extract Exif and other metadata from the given file.*