use a readable stream as file source
This commit is contained in:
parent
dc10a2ddf1
commit
872fa9363d
1 changed files with 11 additions and 1 deletions
|
@ -123,7 +123,17 @@ class FileRender extends React.PureComponent<Props> {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case RENDER_MODES.COMIC:
|
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:
|
case RENDER_MODES.APPLICATION:
|
||||||
return <AppViewer uri={uri} />;
|
return <AppViewer uri={uri} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue