Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

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

Notifications You must be signed in to change notification settings

PyroCDN/node-ovh-storage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%