Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

DeleteObjectCommand


DeleteObjectCommand can be used to delete the specified object on the DID Space.

Parameter Type#

Parameter Name

Type

necessary

Default Value

### Explanation

key

string

Y

Nothing

Can be a file name or folder

Return Type#

parameter name

Type

Necessary

Explanation

statusCode

number

Y

Return status code

statusMessage

string

N

In general, a value will only exist when an error occurs.

stack?

string

N

Stack information

data

空虚

Y


Example code#

  • Delete single object
const { SpaceClient, DeleteObjectCommand } = require('@blocklet/did-space-js');
const getWallet = require('@blocklet/sdk/lib/wallet');

const spaceClient = new SpaceClient({
endpoint,
wallet: getWallet(),
});

await spaceClient.send(
new DeleteObjectCommand({
key: 'demo.txt',
})
);
你获得 0 积分