Alcumus / react-doc-viewer

Apache License 2.0
208 stars 101 forks source link

No Renderer for file type application/json #93

Open kalyanbabutangella opened 2 years ago

kalyanbabutangella commented 2 years ago

image

FaizanMostafa commented 2 years ago

Any update on this issue?

kalyanbabutangella commented 2 years ago

Any update on this issue?

no update

FaizanMostafa commented 2 years ago

It seems like the issue is with the firebase storage, as I am also using firebase storage and getting the same error as yours. Adding a fileType key in every document object along with uri key, helped me overcome this error but now the file renderer keeps on loading.

<DocViewer
  pluginRenderers={DocViewerRenderers}
  documents={[{uri: props.documentURI, fileType: "pdf"}]}
/>

Screenshot from 2021-11-19 20-14-48

kalyanbabutangella commented 2 years ago

It seems like the issue is with the firebase storage, as I am also using firebase storage and getting the same error as yours. Adding a fileType key in every document object along with uri key, helped me overcome this error but now the file renderer keeps on loading.

<DocViewer
  pluginRenderers={DocViewerRenderers}
  documents={[{uri: props.documentURI, fileType: "pdf"}]}
/>

Screenshot from 2021-11-19 20-14-48

Ho, Yeah then have you overcame the loading or not?

FaizanMostafa commented 2 years ago

It seems like the issue is with the firebase storage, as I am also using firebase storage and getting the same error as yours. Adding a fileType key in every document object along with uri key, helped me overcome this error but now the file renderer keeps on loading.

<DocViewer
  pluginRenderers={DocViewerRenderers}
  documents={[{uri: props.documentURI, fileType: "pdf"}]}
/>

Screenshot from 2021-11-19 20-14-48

Ho, Yeah then have you overcame the loading or not?

Unfortunately not yet :'(

kalyanbabutangella commented 2 years ago

Unfortunately not yet :'(

If you get Any solution for this can you please let me know @FaizanMostafa

FaizanMostafa commented 2 years ago

Unfortunately not yet :'(

If you get Any solution for this can you please let me know @FaizanMostafa

react-doc-viewer is unable(keeps loading) to load the document from firebase storage because of CORS error. Follow this stackoverflow answer to set the CORS origin on your google cloud bucket and it will resolve the issue(at least it did for me). Cheers...