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 { export interface UploadAsset {
isLivePhoto: boolean; isLivePhoto?: boolean;
file: File; file?: File;
livePhotoAssets: LivePhotoAssets; livePhotoAssets?: LivePhotoAssets;
} }
export interface LivePhotoAssets { export interface LivePhotoAssets {
image: globalThis.File; image: globalThis.File;

View file

@ -91,7 +91,7 @@ export function segregateFiles(
livePhotoFiles.push({ livePhotoFiles.push({
collectionID: collectionID, collectionID: collectionID,
isLivePhoto: true, 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) { function getFileToBeUploadedKey(fileWithCollection: FileWithCollection) {
const fileName = splitFilenameAndExtension( const fileName = splitFilenameAndExtension(
fileWithCollection.isLivePhoto fileWithCollection.isLivePhoto
? fileWithCollection.livePhotoAsset[0].name + '-livePhoto' ? fileWithCollection.livePhotoAssets[0].name + '-livePhoto'
: fileWithCollection.file.name : fileWithCollection.file.name
)[0]; )[0];
return fileName; return fileName;