AWS S3标识的URL连接code导致" SignatureDoesNotMatch" [英] AWS S3 signed url encode resulting "SignatureDoesNotMatch"
本文介绍了AWS S3标识的URL连接code导致" SignatureDoesNotMatch"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的科尔多瓦文件传输使用签名的链接直接下载中心从AWS S3的文件,因为科尔多瓦文件传输连接codeS URI时,%的签名被转换成%25,因此,导致签名不匹配
I am using cordova file transfer to dowload a file from aws s3 using signed url, since cordova filetransfer encodes the uri, the "%" in signature is converted to "%25", thus, results in signature mismatch
推荐答案
尝试建立像这样的选择:
Try setting up your options like so:
options = {
fileKey: 'file',
fileName: name,
chunkedMode: false,
mimeType: 'audio/3gpp',
httpMethod: 'PUT',
// Important!
headers: {
'Content-Type': 'audio/3gpp' // < Set explicitly otherwise it becomes multipart/form-data which won't work with S3
},
encodeURI: false // < Stops any extra encoding by file transfer logic
}
我花了很多痛苦的时间越来越pre签署PUT操作;与科尔多瓦/ S3工作。古德勒克。
Took me many painful hours getting pre signed PUTs working with cordova / S3. Goodluck.
这篇关于AWS S3标识的URL连接code导致&QUOT; SignatureDoesNotMatch&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文