Skip to content

Releases: baidubce/bce-sdk-js

1.0.2

24 Sep 08:22
Compare
Choose a tag to compare

published on 2024-09-24

What's Changed

  • support global config customGenerateUrl to set custom endpoint. by @sqzhou in #118
  • support x-bce-source header by @sqzhou in #117
  • fix optional-chaining-assign syntax not transformed issue. by @Dora-boots in #119

Full Changelog: 1.0.1...1.0.2

1.0.1

16 Jul 11:36
Compare
Choose a tag to compare

published on 2024-07-16

BosClient

  • putSuperObject API (encapsulation for mutipart upload)
  • getBucketStorageclass API
  • Support the createSignature method in BceConfig for customizing the generation of authentication signatures (Authorization)."
  • support virtual host mode.

BceClient

  • support region and customGenerateUrl to change endpoint.

1.0.0-rc.42

26 Oct 13:43
Compare
Choose a tag to compare

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

1.0.0-rc.41

26 Oct 11:14
Compare
Choose a tag to compare

published on 2023-10-26

  • BosClient: support 'x-bce-process' in headers;
  • BosClient: add createFolderShareUrl method for sharing links;

1.0.0-rc.40

19 Jun 06:16
Compare
Choose a tag to compare

1.0.0-rc.40(2023-06-19)

  • BosClient: 'x-bce-security-token' considered in auth token.

1.0.0-rc.39

16 Jun 11:22
Compare
Choose a tag to compare

1.0.0-rc.39 (2023-06-16)

  • BosClient: Add 'x-bce-security-token' when using generatePresignedUrl with sessionToken;

1.0.0-rc.38

16 Feb 13:01
Compare
Choose a tag to compare

1.0.0-rc.38(2023-02-16)

  • BosClient: support symlink;

1.0.0-rc.37

09 Jan 12:20
Compare
Choose a tag to compare

BosClient: support 'x-bce-server-side-encryption', 'x-bce-restore-days', 'x-bce-restore-tier' headers

1.0.0-rc.36

06 May 06:22
Compare
Choose a tag to compare

What's Changed

1.0.0-rc.35

06 May 04:28
Compare
Choose a tag to compare
  • BOSClient: Just keep an array of all of buffers and concat at the end.