Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to render pdf using url which is secured with token. #260

Open
Dipakrathod00 opened this issue May 27, 2024 · 1 comment
Open

Unable to render pdf using url which is secured with token. #260

Dipakrathod00 opened this issue May 27, 2024 · 1 comment
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Dipakrathod00
Copy link

issue

Unable to render pdf using url which is secured with token. It would be greatful if you guide me in this matter.
Thanks in advance.
@cyntler
@DawnSheedy
@gloribus
@GyGaByyyTe
@hatsu38

@cyntler cyntler added help wanted Extra attention is needed question Further information is requested labels Jun 4, 2024
@kkumar8850
Copy link

don't use headers in docs.
Use requestHeaders={headers} instead

use following code :

const headers = {
Authorization : Bearer ${authToken},
"Content-Type" : "application/json",
}

<DocViewer
pluginRenderers={DocViewerRenderers}
documents={[{ uri: url, fileType : fileType, fileName : fileName }]}
prefetchMethod="GET"
requestHeaders={headers}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants