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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南