mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -05:00
fix: pdf preview tries to render on server
This commit is contained in:
parent
6419da07fb
commit
c3af0fe097
1 changed files with 3 additions and 1 deletions
|
@ -40,7 +40,9 @@ const FilePreview = ({
|
||||||
if (isNotSupported) return <UnSupportedFile />;
|
if (isNotSupported) return <UnSupportedFile />;
|
||||||
|
|
||||||
if (mimeType == "application/pdf") {
|
if (mimeType == "application/pdf") {
|
||||||
window.location.href = `/api/shares/${shareId}/files/${fileId}?download=false`;
|
if (typeof window !== "undefined") {
|
||||||
|
window.location.href = `/api/shares/${shareId}/files/${fileId}?download=false`;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
} else if (mimeType.startsWith("video/")) {
|
} else if (mimeType.startsWith("video/")) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue