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년 전1481회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠