• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Node.js SDK)
  4. Quick Start
  5. Uploading an Object

Uploading an Object

Sample code:

obsClient.putObject({
       Bucket : 'bucketname',
       Key : 'objectkey',
       Body : 'Hello OBS'
}, (err, result) => {
       if(err){
              console.error('Error-->' + err);
       }else{
              console.log('Status-->' + result.CommonMsg.Status);
       }
});
NOTE:

For more information, see Object Upload.