Mention why

This commit is contained in:
Manav Rathi
2024-07-22 13:52:54 +05:30
parent c92e08c8d4
commit d59e50ff93

View File

@@ -339,6 +339,9 @@ export async function updateFileCreationDateInEXIF(
) {
try {
let imageDataURL = await blobToDataURL(fileBlob);
// Since we pass a Blob without an associated type, we get back a
// generic data URL like "data:application/octet-stream;base64,...".
// Modify it to have a `image/jpeg` MIME type.
imageDataURL =
"data:image/jpeg;base64" +
imageDataURL.slice(imageDataURL.indexOf(","));