You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed instructions in documentation written for my React-PDF version
I have checked if this bug is not already reported
I have checked if an issue is not listed in Known issues
If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo
Description
I am unable to load a firestore URL as the source of the pdf viewer when in production mode. I get the error "Not allowed to load local resource" despite the resource being from cloud storage.
Before you start - checklist
Description
I am unable to load a firestore URL as the source of the pdf viewer when in production mode. I get the error "Not allowed to load local resource" despite the resource being from cloud storage.
Steps to reproduce
const [resume, setResume] = useState(null)
const uploadToFirebase = async (x) => {
};
const downloadURL = async () => {
await getDownloadURL(resumeRef).then((response) => {
setResume(response);
})
.catch((error) => {
});
});
}
return (
<>
<PDFViewer src={resume ? resume : null} />
</>
)
Expected behavior
I expected the Document component to be able to render the pdf when given the URL.
Actual behavior
The Document component gave an error "Failed to load PDF file", with a console error stating "Error: Not allowed to load local resource".
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: