Reputation: 4169
Im trying to open a document with
I cant get the documents to preview. Not sure what Im missing here.
Been through quite a few StackOverflow question/answers regarding this already, but still no success.
url = http://192.168.0.6:8077/files/StaffReport.pdf
<iframe
className={'pdf'}
width="100%"
height="600"
frameBorder="0"
src={`https://docs.google.com/gview?url=${this.props.file}&embedded=true`}
/>
But I keep on getting No preview available
Upvotes: 0
Views: 334
Reputation: 306
Likely, google cannot access your url because it's a local ip mapped to your local network (unless it just fetches from the locally running code and shows you that, but I don't know if that's how it works),
I would recommend trying to upload that file somewhere accessible to the internet, and then trying again.
Upvotes: 1