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
gefragt vor 2 Jahren1481 Aufrufe
2 Antworten
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

beantwortet vor 2 Jahren
  • 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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen