node-ovh-storage

1.0.0 • Public • Published

node-ovh-storage

A simple Node.js library to connect to the Object Storage OVH service.

Install via npm

npm install node-ovh-storage

API Usage

var OVHStorage = require('node-ovh-storage');

var config = {
  authURL:  'https://auth.cloud.ovh.net/v3',
  username: 'username',
  password: 'password',
  tenantId: 'tenantId',
  region:   'GRA'
};

const storage = new OVHStorage(config);

// init token
storage.getToken((err) => {

  // create new container
  storage.createContainer('Container-1', () => {

    // put file
    storage.putFile('./tmp/doc.pdf', '/Container-1/doc.pdf', (err, res) => {

      // list files in container
      storage.getFileList('/Container-1', (err, files) => {

        // read file
        storage.getFile('/Container-1/doc.pdf', (err, file) => {
          
        });
      });
    });
  });
});

Readme

Keywords

Package Sidebar

Install

npm i node-ovh-storage

Weekly Downloads

167

Version

1.0.0

License

ISC

Unpacked Size

7.89 kB

Total Files

6

Last publish

Collaborators

  • arnaud00
  • deaf