qoomon / aws-s3-bucket-browser

Single page application to browse AWS S3 bucket content
https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.amazonaws.com/spacenet-dataset#
MIT License
246 stars 85 forks source link

Page shows but no listing and no errors in the console #21

Closed antaenc closed 2 years ago

antaenc commented 3 years ago

I have a bucket with a sub folder, I've specified the bucketUrl as:

http://bucketname.s3.amazonaws.com/?prefix=subfolder/index.html

The S3 Bucket Browser page loads but nothing is listed. There are no errors in the console. If I go to:

https://bucketname.s3.amazonaws.com/?prefix=subfolder I do get a ListBucketResult with the contents shown.

I've tried other combinations but can't get the page to load or I get no listing. Any suggestions?

qoomon commented 3 years ago

@antaenc you bucket url is invalid you need to use the bucket API url is should look like bucketUrl = 'https://bucketname.s3.amazonaws.com'

if you want to link to a subfolder try something like https://bucketname.s3.amazonaws.com/index.html#subfolder/ or just https://bucketname.s3.amazonaws.com#subfolder/

antaenc commented 3 years ago

Thanks, that got me further but now the listing that comes back is the root bucket not the subfolder. FYI I have the index.html in the subfolder. I've tried placing it in the root folder too and I get the same: listing of the root bucket.

qoomon commented 3 years ago

currently there is no feature of bucket explorer to reach your goal. However I could add an option like rootPrefix

antaenc commented 3 years ago

That would be a fantastic addition, especially for the use case I'm trying to realise!

qoomon commented 3 years ago

by default rootPrefix would be the url path of index.html

qoomon commented 3 years ago

I'll probably add this feature within the next days.

antaenc commented 3 years ago

That would be a great help and I think a useful addition, many thanks.

qoomon commented 3 years ago

Should work now, please confirm

qoomon commented 3 years ago

FYI I did not add the automatic default for now

antaenc commented 3 years ago

Had time to try this morning and I'm getting no listing even though the page loads. I've tried the following for bucketUrl:

My rootPrefix is:

I see no errors in the console and see the correct rootPrefix logged.

S3 Bucket REST API: http://s3.us-east-1.amazonaws.com/public-read-access
S3 Bucket Root Prefix: installation-images/
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
qoomon commented 3 years ago

Could you try again? For me it's working. I'll give you an example tomorrow.

On Fri, 17 Sep 2021, 16:02 antaenc, @.***> wrote:

Had time to try this morning and I'm getting no listing even though the page loads. I've tried the following for bucketUrl:

My rootPrefix is:

  • rootPrefix: '', // e.g. 'subfolder/'

I see no errors in the console and see the correct rootPrefix logged.

S3 Bucket REST API: http://s3.us-east-1.amazonaws.com/public-read-access S3 http://s3.us-east-1.amazonaws.com/public-read-accessS3 Bucket Root Prefix: installation-images/ Download the Vue Devtools extension for a better development experience:https://github.com/vuejs/vue-devtools

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/qoomon/aws-s3-bucket-browser/issues/21#issuecomment-921821534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6HUAS7F645ARAWIRWTKGLUCNC6FANCNFSM5EAO3YTA .

qoomon commented 2 years ago

Hi @antaenc I found multiple problems with your setup

qoomon commented 2 years ago

If you open our web console you will see all the errors.

qoomon commented 2 years ago

following config should work

    const config = {
          bucketUrl: 'https://s3.us-east-1.amazonaws.com/public-read-access',
          rootPrefix: 'installation_images/',
          keyExcludePatterns: [ /^index\.html$/ ],
          pageSize: 50,
          title: 'Senzing Installation Images',
          subtitle: 'For non-internet facing installations only - support@senzing.com',
          logo: 'https://senzing.com/wp-content/uploads/Logos_Sz-Icon-clear.png',
          favicon: 'https://senzing.com/wp-content/uploads/Logos_Sz-Icon-clear.png'
        }

then go to https://s3.us-east-1.amazonaws.com/public-read-access/installation_images/index.html

antaenc commented 2 years ago

It's now working wonderfully. Thank you ever so much for making this happen.

qoomon commented 2 years ago

Glad to hear that.