use a readable stream as file source

This commit is contained in:
Baltazar Gomez 2020-05-08 13:45:48 -05:00 committed by Sean Yesmunt
parent dc10a2ddf1
commit 872fa9363d

View file

@ -123,7 +123,17 @@ class FileRender extends React.PureComponent<Props> {
/>
);
case RENDER_MODES.COMIC:
return <ComicBookViewer source={downloadPath} theme={currentTheme} />;
return (
<ComicBookViewer
source={{
// @if TARGET='app'
file: options => fs.createReadStream(downloadPath, options),
// @endif
stream: source
}}
theme={currentTheme}
/>
);
case RENDER_MODES.APPLICATION:
return <AppViewer uri={uri} />;
}