@inkcloud/swift-object-storage
## Installation `npm install` or `yarn install`
Last updated 2 years ago by adamh114 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @inkcloud/swift-object-storage 
SYNC missed versions from official npm registry.

Swift Object Storage

Installation

npm install or yarn install

Example Usage

const config = {
  objectStorageUrl: objectStorageUrl: 'https://dal05.objectstorage.softlayer.net/auth/v1.0/'
	user: 'username';
	key: 'key';

}
const client = new SwiftObjectStorage(config);

// Get remote file and store locally
client.getObjectWriteToStream(
  fs.createWriteStream('my-local-file.pdf'),
  'some-container'
  'remote-filepdf'
)
  .then() => console.log('done');

Inject onResponse callback.

You can optionally pass an onResponse callback and it will be passed to Request's .on('response'). This is useful for when you need access to the response context

client.getObjectWriteToStream(
  fs.createWriteStream('my-local-file.pdf'),
  'some-container'
  'remote-filepdf',
  {
    onResponse: (resp) => console.log('Response', resp);
  }
)
  .then() => console.log('done');

Current Tags

  • 1.0.2                                ...           latest (2 years ago)

2 Versions

  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 2
This Month 3
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |