这是我使用yui上传器的一部分:
function upload() {
if (fileID != null) {
uploader.upload(fileID, "http://url",
'POST',
{ AWSAccessKeyId: "keyhere",
acl: "public-read",
key: "queue/${filename}",
policy: "somestring",
Content-Type: "",
success_action_redirect: "http://urlhere",
signature: "sigstring"
},
'file');
fileID = null;
}
}
“内容-类型”导致语法错误。我能看出问题所在。但是,我贴出的亚马逊 s3桶期待的是这个变量名为。因此,我没有选择用下划线替换减号或使用CamelCase概念。
如何将“内容类型”作为变量名提交?
发布于 2012-05-28 00:36:13
将键放在引号中:
"Content-Type": "",
发布于 2012-05-28 00:36:05
使用双引号:
{ AWSAccessKeyId: "keyhere",
acl: "public-read",
key: "queue/${filename}",
policy: "somestring",
"Content-Type": "",
success_action_redirect: "http://urlhere",
signature: "sigstring"
},
https://stackoverflow.com/questions/10781598
复制相似问题