AWS S3 signed url encode resulting “SignatureDoesNotMatch”

依然范特西╮ 提交于 2019-12-04 11:10:26

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
        }

Took me many painful hours getting pre signed PUTs working with cordova / S3. Goodluck.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!