fix office preview

This commit is contained in:
Hans362
2021-09-11 18:22:22 +08:00
parent e53716eb12
commit 82721e01f1
+1 -1
View File
@@ -14,7 +14,7 @@ const OfficePreview: FunctionComponent<{ file: any }> = ({ file }) => {
return (
<>
<div className="overflow-scroll shadow" ref={docContainer} style={{ maxHeight: '90vh' }}>
<Preview url={file['@microsoft.graph.downloadUrl']} width={docContainerWidth.toString()} height="800" />
<Preview url={encodeURIComponent(file['@microsoft.graph.downloadUrl'])} width={docContainerWidth.toString()} height="800" />
</div>
<div className="mt-4">
<DownloadBtn downloadUrl={file['@microsoft.graph.downloadUrl']} />