S3 Access denied on pdf file type only

0

Hi All,

I have created a S3 bucket to store images, video and pdf.

Public access is off.

I have applied a bucket policy and CORS to allow access only from a certain website.

I can upload all file types.

I can download all file types, except PDF files.

I receive the general XML access denied error.

I can't figure out why I can get and view other file types but not pdf.

Any advice / ideas would be great as I've spent hours trying to figure this out.

Thanks :)

KevinS
已提问 2 年前1480 查看次数
2 回答
0

I did find this stackoverflow link that deals with a REST api issue someone had. Could this be the issue you're having, too?

They didn't use the S3ObjectInputStream. They used InputStream instead and that caused their problem.

https://stackoverflow.com/questions/50043662/s3-download-pdf-rest-api

已回答 2 年前
  • thanks jschwar313, i'm just using a basic HTML embed method <iframe src="[S3 URL of pdf]" height="100%" width="100%"></iframe> but no luck...

0

Hi All, this issue is still unresolved, after many hours of painful research and trying different things.

Does anyone have a CORS policy that allows pdf files to be previewed or downloaded from S3 on a web page?

Thanks

KevinS
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则