mirror of
https://github.com/ente-io/ente.git
synced 2025-08-11 08:53:13 +00:00
Fix the fallback
This commit is contained in:
parent
09036bb57f
commit
ca8ae8c6e7
@ -121,9 +121,10 @@ export const updateExifIfNeeded = async (
|
|||||||
// Not a JPEG (likely).
|
// Not a JPEG (likely).
|
||||||
if (extension != "jpeg" && extension != "jpg") return stream;
|
if (extension != "jpeg" && extension != "jpg") return stream;
|
||||||
|
|
||||||
|
const blob = await new Response(stream).blob();
|
||||||
try {
|
try {
|
||||||
const updatedBlob = await setJPEGExifDateTimeOriginal(
|
const updatedBlob = await setJPEGExifDateTimeOriginal(
|
||||||
await new Response(stream).blob(),
|
blob,
|
||||||
new Date(enteFile.pubMagicMetadata.data.editedTime / 1000),
|
new Date(enteFile.pubMagicMetadata.data.editedTime / 1000),
|
||||||
);
|
);
|
||||||
return updatedBlob.stream();
|
return updatedBlob.stream();
|
||||||
@ -133,7 +134,7 @@ export const updateExifIfNeeded = async (
|
|||||||
// in case of errors, return the original back instead of causing the
|
// in case of errors, return the original back instead of causing the
|
||||||
// entire download or export to fail.
|
// entire download or export to fail.
|
||||||
log.error(`Failed to modify Exif date for ${fileName}`, e);
|
log.error(`Failed to modify Exif date for ${fileName}`, e);
|
||||||
return stream;
|
return blob.stream();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user