This commit is contained in:
Manav Rathi 2024-04-24 11:49:58 +05:30
parent cb0b549027
commit 58b1c4b489
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -128,7 +128,7 @@ async function extractMetadata(
} else if (fileTypeInfo.fileType === FILE_TYPE.VIDEO) {
extractedMetadata = await getVideoMetadata(receivedFile);
}
const fileHash = await getFileHash(worker, receivedFile);
const hash = await getFileHash(worker, receivedFile);
const metadata: Metadata = {
title: receivedFile.name,
@ -140,7 +140,7 @@ async function extractMetadata(
latitude: extractedMetadata.location.latitude,
longitude: extractedMetadata.location.longitude,
fileType: fileTypeInfo.fileType,
hash: fileHash,
hash,
};
const publicMagicMetadata: FilePublicMagicMetadataProps = {
w: extractedMetadata.width,

View file

@ -12,6 +12,7 @@ import {
} from "types/file";
import { EncryptedMagicMetadata } from "types/magicMetadata";
/** Information about the file that never changes post upload. */
export interface Metadata {
/**
* The file name.