JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 409
  • Score
    100M100P100Q90035F
  • License ISC

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

Package Exports

  • node-ovh-storage
  • node-ovh-storage/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-ovh-storage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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) => {
          
        });
      });
    });
  });
});