Merge pull request #859 from ente-io/update-electron-saveStreamToDisk-api-type
update saveStreamToDisk Api type and usage
This commit is contained in:
commit
c9915f9053
|
@ -483,16 +483,16 @@ class ExportService {
|
|||
motionPhoto.videoNameTitle,
|
||||
file.id
|
||||
);
|
||||
this.saveMediaFile(collectionPath, videoSaveName, videoStream);
|
||||
await this.saveMediaFile(collectionPath, videoSaveName, videoStream);
|
||||
await this.saveMetadataFile(collectionPath, videoSaveName, file);
|
||||
}
|
||||
|
||||
private saveMediaFile(
|
||||
private async saveMediaFile(
|
||||
collectionFolderPath: string,
|
||||
fileSaveName: string,
|
||||
fileStream: ReadableStream<any>
|
||||
) {
|
||||
this.electronAPIs.saveStreamToDisk(
|
||||
await this.electronAPIs.saveStreamToDisk(
|
||||
getFileSavePath(collectionFolderPath, fileSaveName),
|
||||
fileStream
|
||||
);
|
||||
|
|
|
@ -13,7 +13,10 @@ export interface ElectronAPIs {
|
|||
oldDirPath: string,
|
||||
newDirPath: string
|
||||
) => Promise<void>;
|
||||
saveStreamToDisk: (path: string, fileStream: ReadableStream<any>) => void;
|
||||
saveStreamToDisk: (
|
||||
path: string,
|
||||
fileStream: ReadableStream<any>
|
||||
) => Promise<void>;
|
||||
saveFileToDisk: (path: string, file: any) => Promise<void>;
|
||||
selectRootDirectory: () => Promise<string>;
|
||||
sendNotification: (content: string) => void;
|
||||
|
|
Loading…
Reference in a new issue