0.0.2 • Published 4 years ago
cipher-s3-adapter v0.0.2
import
import { Client } from 'cipher-s3-adapter'
init
const options = {
region: ...,
bucket: ...,
accessKeyId: ...,
secretAccessKey: ...
};
const client = new Client(options);
Vue.prototype.$client = client;
list
this.$client.listObjects(Prefix)
.then((data) => {
...
})
.catch((error) => {
...
});
put
this.$client.putObject(object, Key)
.then((data) => {
...
})
.catch((error) => {
...
});
delete
this.$client.deleteObject(Key)
.then((data) => {
...
})
.catch((error) => {
...
});