Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Public URL is incorrectly generated? #39

Open
jennaprice opened this issue Aug 14, 2018 · 1 comment
Open

Public URL is incorrectly generated? #39

jennaprice opened this issue Aug 14, 2018 · 1 comment

Comments

@jennaprice
Copy link

Hello,

Very grateful for this adapter, did notice a small problem with the public url:

return 'https://' + bucket + '.s3.amazonaws.com' + absolutePath; on line 210

all of my public urls are

'https:// 's3.amazonaws.com/' + bucket + '/' +absolutePath;

Am I the only one that has this problem?

I could easily submit a PR for this.
Thanks

@jordanyim1
Copy link

In case you or anyone else is still wondering, I think you just need to use the following when initializing keystone.Storage:

module.exports = new keystone.Storage({
	adapter: require('keystone-storage-adapter-s3'),
	s3: {
                ...
		publicUrl: 'https://s3.amazonaws.com/' + bucket,
	},
       ...
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants