全部產品
Search
文件中心

Object Storage Service:0016-00000501

更新時間:Jun 08, 2024

問題描述

請求缺少position參數。

問題原因

您發起了AppendObject請求,但是請求URL中缺少該介面必選的position參數。

問題樣本

以下請求中URL中缺少必選的position參數。

POST /example?append HTTP/1.1 
Host: versioning-append.oss.aliyuncs.com 
Date: Tue, 09 Apr 2019 03:59:33 GMT
Content-Length: 3
Content-Type: application/octet-stream
Authorization: OSS qn6q**************:77Dv****************

解決方案

確保請求URL中添加position參數,該參數用於指定追加的位置。首次追加操作的position必須為0,後續追加操作的position是Object的當前大小。例如,第一次AppendObject請求指定position值為0,content-length是65536,則第二次AppendObject需要指定position為65536。

首次追加請求樣本如下:

POST /example?append&position=0 HTTP/1.1 
Host: versioning-append.oss.aliyuncs.com 
Date: Tue, 09 Apr 2019 03:59:33 GMT
Content-Length: 3
Content-Type: application/octet-stream
Authorization: OSS qn6q**************:77Dv****************

相關文檔

AppendObject