You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/ali-oss/lib/common/object/delete.js

23 lines
509 B

1 month ago
const proto = exports;
/**
* delete
* @param {String} name - object name
* @param {Object} options
* @param {{res}}
*/
proto.delete = async function _delete(name, options = {}) {
options.subres = Object.assign({}, options.subres);
if (options.versionId) {
options.subres.versionId = options.versionId;
}
const params = this._objectRequestParams('DELETE', name, options);
params.successStatuses = [204];
const result = await this.request(params);
return {
res: result.res
};
};