Alcumus / react-doc-viewer

Apache License 2.0
208 stars 101 forks source link

feat: add prefetchMethod option #96

Open adrael opened 2 years ago

adrael commented 2 years ago

Some services (such as AWS) provide URLs that works only for one pre-configured verb. By default, react-doc-viewer fetches document metadata through a HEAD request in order to guess its Content-Type. If you need to have a specific verb for the pre-fetching, use the prefetchMethod option on the DocViewer:

import DocViewer from "react-doc-viewer";

<DocViewer
  prefetchMethod="GET"
/>;
adrael commented 2 years ago

Hey @mattmogford-alcumus 👋 Any news on this front? Thanks 🙏

itsmitchyyy commented 2 years ago

any update on this? this would be good

adrael commented 2 years ago

Hey @mattmogford-alcumus 👋 Any news on this front? Thanks 🙏

adrael commented 2 years ago

Any chance this PR gets merged some time soon? 😅

crice88 commented 2 years ago

Please???

cyntler commented 2 years ago

@crice88 @adrael @itsmitchyyy I forked this repository and added changes from this pull request. Additionally, I added the ability to overwrite the component with loading renderer and no renderer (error). This fork is here and has the ability to add from npm: https://github.com/cyntler/react-doc-viewer