Registry / storage / node-ovh-storage

node-ovh-storage

JSON →
library1.0.0jsnpmunverified

A Node.js library for interacting with OVH Object Storage (OpenStack Swift). Version 1.0.0 provides basic operations: token authentication, container creation, file upload/download, and file listing. It uses callbacks and requires manual token management. Not updated since initial release; limited to OVH's auth endpoint and OpenStack Swift API. No TypeScript types, no promise support. Minimal error handling.

npm install node-ovh-storage
INSTALL
IMPORT
SIG · NODE-OVH-STORAGE
N
node-ovh-storage
storagejavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OVHStorage
const OVHStorage = require('node-ovh-storage');
import OVHStorage from 'node-ovh-storage';
Library uses CommonJS and does not support ESM imports.

Demonstrates token initialization, container creation, file upload, and file list retrieval using callbacks.

const OVHStorage = require('node-ovh-storage'); const config = { authURL: 'https://auth.cloud.ovh.net/v3', username: process.env.OVH_USERNAME ?? '', password: process.env.OVH_PASSWORD ?? '', tenantId: process.env.OVH_TENANT_ID ?? '', region: 'GRA' }; const storage = new OVHStorage(config); storage.getToken((err) => { if (err) { console.error(err); return; } storage.createContainer('my-container', () => { storage.putFile('./test.txt', '/my-container/test.txt', (err, res) => { if (err) { console.error(err); return; } console.log('File uploaded'); storage.getFileList('/my-container', (err, files) => { if (err) { console.error(err); return; } console.log('Files:', files); }); }); }); });
Debug
Known issues
gotchaAll methods use callbacks, not Promises or async/await. Unhandled errors will crash the process.
fix
Wrap calls in try-catch or add error callbacks.
affects: 1.0.0
gotchaThe library does not validate configuration inputs. Invalid credentials or region will cause opaque errors.
fix
Check config fields and test with known good values.
affects: 1.0.0
Errors
Common errors & fixes
TypeError: storage.getToken is not a function
Forgot to instantiate OVHStorage with 'new'.
fix
Use `new OVHStorage(config)` instead of `OVHStorage(config)`.
Error: getaddrinfo ENOTFOUND auth.cloud.ovh.net
Wrong authURL or network issue. OVH uses different endpoints per region.
fix
Use the correct authURL for your region, e.g., 'https://auth.cloud.ovh.net/v3' for GRA.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
Amazon
1
Resources
node-ovh-storage — npm install node-ovh-storage · libregistry