edit-icon download-icon


Last Updated: Jul 09, 2018

OSS(options) introduction

  • [accessKeyId] {String} AccessKey you create on Alibaba Cloud console website
  • [accessKeySecret] {String} access secret you create
  • [stsToken] {String} use temporary authorization method. For more information, see Use STS to access OSS.
  • [bucket] {String} the default bucket you want to access If you don’t have any bucket, please use putBucket() create one first.
  • [endpoint] {String} oss region domain. It takes priority over region.
  • [region] {String} the bucket data region location, please see Data Regions, default is oss-cn-hangzhou.
  • [internal] {Boolean} access OSS with Alibaba Cloud internal network or not, default is false. If your servers are running on Alibaba Cloud too, you can set true to save lot of money.
  • [secure] {Boolean} instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol.
  • [timeout] {String|Number} instance level time-out for all operations, default is 60s


  1. var oss = require('ali-oss');
  2. var store = oss({
  3. accessKeyId: 'your access key',
  4. accessKeySecret: 'your access secret',
  5. bucket: 'your bucket name',
  6. region: 'oss-cn-hangzhou'
  7. });
Thank you! We've received your feedback.