I have solve cors issue from S3 bucket . it is my cors settings
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
},
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
},
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
- I have used react-pdf library. but it has occured pdf loaded without error.
- I have used react-pdf-js-infinite library . It has been working but. I has been very slowly opening pdf file.
3.I have used iframe. it has been working only firefox. but Chrome has not been working.
<object
data={this.state.file}
type="application/pdf"
width="100%"
height="600"
style={{overflow:"unset"}}
>
<iframe
sandbox="allow-same-origin allow-scripts allow-forms"
title="PortletIFrameWidget"
src={this.state.file}
ref={(f) => { this.ifr = f }}
width="500"
height="678"
>
</iframe>
I have used by
this.url = 'https://docs.google.com/viewer?embedded=true&url=' +tempfile+ 'this.state.file+&hl=en&pid=explorer&efh=false&a=v&chrome=false&embedded=true'; for iframe . It has occured large file failed error
How to solve problem other way?