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/getObjectMeta.js

24 lines
623 B

4 weeks ago
const proto = exports;
/**
* getObjectMeta
* @param {String} name - object name
* @param {Object} options
* @param {{res}}
*/
proto.getObjectMeta = async function getObjectMeta(name, options) {
options = options || {};
name = this._objectName(name);
options.subres = Object.assign({ objectMeta: '' }, options.subres);
if (options.versionId) {
options.subres.versionId = options.versionId;
}
const params = this._objectRequestParams('HEAD', name, options);
params.successStatuses = [200];
const result = await this.request(params);
return {
status: result.status,
res: result.res
};
};