Skip to content

Commit 536fea8

Browse files
committed
Fix PDF preview to use Google Docs Viewer instead of direct downloading
1 parent 0f81173 commit 536fea8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/public/FilePreviewModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default function FilePreviewModal({ file, onClose }: FilePreviewModalProp
146146

147147
{isPdf && (
148148
<iframe
149-
src={file.fileUrl}
149+
src={`https://docs.google.com/viewer?url=${encodeURIComponent(file.fileUrl)}&embedded=true`}
150150
style={{
151151
width: "100%",
152152
height: "100%",

0 commit comments

Comments
 (0)