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
asked 2 years ago1463 views
2 Answers
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

answered 2 years ago
  • 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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions