租房小程序前端代码
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.

23 lines
623 B

3 months ago
  1. const proto = exports;
  2. /**
  3. * getObjectMeta
  4. * @param {String} name - object name
  5. * @param {Object} options
  6. * @param {{res}}
  7. */
  8. proto.getObjectMeta = async function getObjectMeta(name, options) {
  9. options = options || {};
  10. name = this._objectName(name);
  11. options.subres = Object.assign({ objectMeta: '' }, options.subres);
  12. if (options.versionId) {
  13. options.subres.versionId = options.versionId;
  14. }
  15. const params = this._objectRequestParams('HEAD', name, options);
  16. params.successStatuses = [200];
  17. const result = await this.request(params);
  18. return {
  19. status: result.status,
  20. res: result.res
  21. };
  22. };