π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Sibling
Manav Rathib12f981f5ba7
diff --git a/web/packages/media/file-metadata.ts b/web/packages/media/file-metadata.tsindex d1607fff6b..080506b16a 100644--- a/web/packages/media/file-metadata.ts+++ b/web/packages/media/file-metadata.ts@@ -1,7 +1,7 @@import { encryptMetadata } from "@/base/crypto/ente";import { authenticatedRequestHeaders, ensureOk } from "@/base/http";import { apiURL } from "@/base/origins";-import { EnteFile } from "@/new/photos/types/file";+import { type EnteFile } from "@/new/photos/types/file";import { FileType } from "./file-type";/**@@ -229,6 +229,29 @@ export const updateMagicMetadataRequest = async (};};+/**+ * Update the magic metadata for a list of files.+ *+ * @param request The list of file ids and the updated encrypted magic metadata+ * associated with each of them.+ */+export const putFilesMagicMetadata = async (+ request: UpdateMagicMetadataRequest,+) =>+ ensureOk(+ await fetch(await apiURL("/files/magic-metadata"), {+ method: "PUT",+ headers: await authenticatedRequestHeaders(),+ body: JSON.stringify(request),+ }),+ );++/**+ * Update the public magic metadata for a list of files.+ *+ * @param request The list of file ids and the updated encrypted magic metadata+ * associated with each of them.+ */export const putFilesPublicMagicMetadata = async (request: UpdateMagicMetadataRequest,) =>