I tried to upload a file to s3 using MultipartRequest in flutter but upon reach "response.send()" i get
I/flutter ( 8307): HandshakeException: Handshake error in client (OS Error:
I/flutter ( 8307): CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain(handshake.cc:354))
I turned 'SSL Certificate Verification' off in Postman for it work, so is there any way to turn it off in flutter whilst uploading?
here is the code i used:
var request = http.MultipartRequest('POST', uri)
..fields['key'] = data.key
..fields['x-amz-algorithm'] = data.algorithm
..fields['x-amz-credential'] = data.credential
..fields['x-amz-date'] = data.date
..fields['x-amz-security-token'] = data.securityToken
..fields['policy'] = data.policy
..files.add(await http.MultipartFile.fromPath('File', imagePath, filename: imageName));
print(request.toString());
try {
var response = await request.send();
await for (var value in response.stream.transform(utf8.decoder)) {
print(value);
}
} catch (e) {
print(e.toString());
}