全部產品
Search
文件中心

Object Storage Service:0006-00000224

更新時間:Mar 07, 2026

問題描述

PostObject請求policy表單域中Conditions部分某個參數類型有誤。

問題原因

您發起了PostObject請求來上傳檔案,但是請求Post Policy中的conditions部分存在某個匹配條件的參數類型有誤,導致請求錯誤。

問題樣本

以下樣本中使用了“not-in”的匹配條件,該匹配條件要求第二個參數類型是一個列表。而樣本中第二個參數類型為字串"no-cache",與介面要求不相符,導致請求錯誤。

{
    "expiration": "2023-02-19T13:19:00.000Z",
    "conditions": [
      	["not-in", "cache-control", "no-cache"]
    ]
}

解決方案

您可以參考以下多種匹配條件配置正確的樣本。

{
    "expiration": "2023-02-19T13:19:00.000Z",
    "conditions": [    
        ["content-length-range", 1, 1024],
        ["eq", "$success_action_status", "201"],
        ["starts-with", "$key", "user/eric/"],
        ["in", "$content-type", ["image/jpeg", "image/png"]],
        ["not-in", "$cache-control", ["no-cache"]]
    ]
}

相關文檔