gpt4 book ai didi

policy - 根据策略策略条件无效失败以 $content-type ""开头

转载 作者:行者123 更新时间:2023-12-04 06:07:20 25 4
gpt4 key购买 nike

我正在尝试在 Sony Xperia Tipo 或 HTC Evo 3d with android 4.0 上使用 fineuploader 3.8.2 上传照片,但遇到了一个奇怪的问题。通过相机作品上传时,通过画廊上传不起作用并且给我根据策略策略条件无效失败以 $content-type ""错误开始

$('#fineuploader-s3').fineUploaderS3({
request: {
endpoint: "http://mybucket.s3.amazonaws.com",
accessKey: "MYACCESSKEY"
},

signature: {
endpoint: "myendpoint",
},

objectProperties: {
acl: 'public-read',
key: =>
uploaded_image_key = qq.getUniqueId()
return "#{uploaded_image_key}.png"
},

iframeSupport: {
localBlankPagePath: "/myiframe.html"
},

text: {
uploadButton: '<div><i class="icon-upload"></i>&nbsp;Upload Image</div>'
},

uploadSuccess:{
endpoint: null
},

template: 'mytemplate',

camera: {
ios: true
},

multiple: false,

retry: {
showButton: true
},

validation: {
allowedExtensions: ["gif", "jpeg", "jpg", "png"],
acceptFiles: "image/gif, image/jpeg, image/png"
},

chunking: {
enabled: true
},

resume: {
enabled: true
}
}).on('complete', (event, id, fileName, responseJSON) =>
if responseJSON.success
$(@el).find('#thumb_pics').append("<img class='thumb' src ='http://s3.amazonaws.com/mybucket/#{uploaded_image_key}.png' title = '#{fileName}' />")
$('#submit_feedpost').prop('disabled', false)
).on('error', (event, id, fileName, errorReason, xhr) =>
$('#submit_feedpost').prop('disabled', false)
alert(errorReason)
)

我的政策是这样的-

'{
"expiration": "myexpirationdate",
"conditions":[
{"bucket": "mybucket"},
["starts-with", "$key" , ""],
{"acl": "public-read"},
{"success_action_status": "200"},
["starts-with", "$Content-Type", ""],
["starts-with", "$x-amz-meta-qqfilename", ""]
]
}'

我的CORS是这样的——

<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>

最佳答案

不好意思打扰了。我找出问题所在。我使用自己的策略对其进行签名,而不是对 fineuploader 库在发布请求中发送到我的端点的策略进行签名。总之非常感谢

关于policy - 根据策略策略条件无效失败以 $content-type ""开头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20525214/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com