fix minor issues

This commit is contained in:
Abhinav 2022-02-13 09:52:59 +05:30
parent 7b45aee757
commit 10be89e72c
2 changed files with 5 additions and 5 deletions

View file

@ -64,9 +64,9 @@ export interface ProgressUpdater {
}
export interface UploadAsset {
isLivePhoto: boolean;
file: File;
livePhotoAssets: LivePhotoAssets;
isLivePhoto?: boolean;
file?: File;
livePhotoAssets?: LivePhotoAssets;
}
export interface LivePhotoAssets {
image: globalThis.File;

View file

@ -91,7 +91,7 @@ export function segregateFiles(
livePhotoFiles.push({
collectionID: collectionID,
isLivePhoto: true,
livePhotoAsset: { image: imageFile, video: videoFile },
livePhotoAssets: { image: imageFile, video: videoFile },
});
}
}
@ -114,7 +114,7 @@ export function addKeysToFilesToBeUploaded(files: FileWithCollection[]) {
function getFileToBeUploadedKey(fileWithCollection: FileWithCollection) {
const fileName = splitFilenameAndExtension(
fileWithCollection.isLivePhoto
? fileWithCollection.livePhotoAsset[0].name + '-livePhoto'
? fileWithCollection.livePhotoAssets[0].name + '-livePhoto'
: fileWithCollection.file.name
)[0];
return fileName;