iframe and folders

0

I am a complete newby to AWS and HTML and want to create a pdf file sharing solution for my social group. I have created a s3 bucket with my pdf's in a folder. when I specify a single file the web page works ok ie <iframe src="Songs/my file name.pdf" width="100%" height="300" style="border:none;"> </iframe>. I cannot find a way to specify all the files using a wild card and I cannot specify each file individually so how can it be done. If I am in the wrong forum please advise

  • Thanks to Riku and Kallu for your answers.

Ian
asked 3 months ago386 views
2 Answers
2

I would strongly advice against including api key & secret in client side code. Even when you craft the IAM policy very carefully it is easy to make mistakes or later alter the policy causing potentially very costly failures.

S3 API for public buckets works also in anonymous mode without credentials. See https://stackoverflow.com/questions/69223827/using-aws-sdk-without-credentials

profile picture
EXPERT
Kallu
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Thanks for your advice.

1
Accepted Answer

Hello.

I don't think it's possible to display all the PDFs in the bucket using only HTML.
I think you will need to use JavaScript as answered in the Stackoverflow below.
https://stackoverflow.com/questions/5897505/how-can-i-provide-directory-listings-for-those-viewing-my-amazon-s3-based-static

profile picture
EXPERT
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
  • Thanks for your advice.

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