Ina*_*him 4 amazon-s3 file-transfer amazon-web-services cordova pre-signed-url
我正在使用cordova文件传输来使用签名网址从aws s3下载文件,因为cordova filetransfer对uri进行编码,签名中的"%"将转换为"%25",从而导致签名不匹配
小智 7
尝试设置您的选项,如下所示:
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
}
Run Code Online (Sandbox Code Playgroud)
在使用cordova/S3进行预签名的PUT时,花了很多时间.祝好运.
| 归档时间: |
|
| 查看次数: |
998 次 |
| 最近记录: |