Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@baiducloud/sdk

Package Overview
Dependencies
Maintainers
0
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baiducloud/sdk - npm Package Versions

1
57

1.0.0-rc.10

Diff

mudio
published 1.0.0-rc.9 •

mudio
published 1.0.0-rc.8 •

mudio
published 1.0.0-rc.7 •

mudio
published 1.0.0-rc.6 •

mudio
published 1.0.0-rc.5 •

mudio
published 1.0.0-rc.4 •

Changelog

Source

1.0.0-rc.42

published on 2023-10-26

  • BosClient: support callback parameter in options;

Approach 1:

Use the callback parameter, the SDK will help you process the parameter and add it to the request header.

try {
  const res = await client.putObjectFromString('bucketName', 'fileName', 'demo-string', {
    callback: {
      urls: ['https://www.test.com/callback'],
      vars: {name: 'baidu'},
      encrypt: 'config',
      key: 'callback1'
    }
  });

  /* callback result */
  console.log(res.body.callback.result);
} catch (e) {
  /* callback error code */
  console.error(res.body.callback.code);
  /* callback error message */
  console.error(res.body.callback.message);
}

Approach 2:

Directly pass the "x-bce-process" parameter to headers.

try {
  const res = await client.putObjectFromString('bucketName', 'fileName', 'demo-string', {
    'x-bce-process': 'callback/callback,u_WyJodHRwczovL3d3dy50ZXN0LmNvbS9jYWxsYmFjayJd,m_sync,v_eyJuYW1lIjoiYmFpZHUifQ'
  });

  /* callback result */
  console.log(res.body.callback.result);
} catch (e) {
  /* callback error code */
  console.error(res.body.callback.code);
  /* callback error message */
  console.error(res.body.callback.message);
}
mudio
published 1.0.0-rc.3 •

Changelog

Source

1.0.0-rc.39

published on 2023-06-16

  • BosClient: Add 'x-bce-security-token' when using generatePresignedUrl with sessionToken;
mudio
published 1.0.0-rc.2 •

Changelog

Source

1.0.0-rc.29

published on 2021-08-03

  • BOSClient: support "config.removeVersionPrefix"(boolean) parameter to dynamic control 'v1' prefix of resource in generatePresignedUrl, generateUrl;
mudio
published 1.0.0-rc.1 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc