我使用的科尔多瓦文件传输使用签名的链接直接下载中心从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.