Re使用加签的url上传对象
def put_object_with_url(self, sign_url, data, headers=None, progress_callback=None):
""" 使用加签的url上传对象
:param sign_url: 加签的url
:param data: 待上传的数据
:param headers: 用户指定的HTTP头部。可以指定Content-Type、Content-MD5、x-oss-meta-开头的头部等,必须和签名时保持一致
:param progress_callback: 用户指定的进度回调函数。参考 :ref:`progress_callback`
:return:
"""
headers = http.CaseInsensitiveDict(headers)
if progress_callback:
data = utils.make_progress_adapter(data, progress_callback)
if self.enable_crc:
data = utils.make_crc_adapter(data)
logger.info("Start to put object with signed url, bucket: {0}, sign_url: {1}, headers: {2}".format(
self.bucket_name, sign_url, headers))
resp = self._do_url('PUT', sign_url, data=data, headers=headers)
logger.info("Put object with url done, req_id: {0}, status_code: {1}".format(resp.request_id, resp.status))
result = PutObjectResult(resp)
if self.enable_crc and result.crc is not None:
utils.check_crc('put object', data.crc, result.crc, result.request_id)
return result
-------------------------
Re使用加签的url上传对象
我打错字了, 联系在线人工,从八点到11点都没回复,急等