Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Create bucket in default region if it doesnt exist #2

Merged
merged 4 commits into from
Apr 9, 2018

Conversation

justinmchase
Copy link
Contributor

If the bucket doesn't exist already, create it.

@jacobheun
Copy link
Contributor

I think this would be good to be configurable as people may not want to inadvertently create Buckets. Perhaps taking from the datastore-fs logic and using createIfMissing:

const store = new S3Store('.ipfs/datastore', {
  s3: s3Instance,
  createIfMissing: false  // defaults to true (mimic datastore-fs)
})

Also, it might be good to put the logic in open and not put since it's only needed when the repo starts.

@justinmchase
Copy link
Contributor Author

Yeah, sounds good. I'll add that tonight.

@justinmchase
Copy link
Contributor Author

I added tests and documentation and manually tested locally.

@jacobheun
Copy link
Contributor

LGTM!

@jacobheun jacobheun merged commit 2fcea97 into ipfs:master Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants