Closed jiyarong closed 6 years ago
"Hostname cn.wfl-ischool.app.oralv1.s3.cn-north-1.amazonaws.com.cn not verified: certificate: sha256/7ZXQS/UDzRMV2KyFbtuVg0QKioBlbEeVNh2VJoGwHzI= DN: CN=.s3.cn-north-1.amazonaws.com.cn,O=Amazon Connect Technology Services (Beijing) Co.\, Ltd.,L=Huairou District,ST=Beijing,C=CN subjectAltNames: [.s3.cn-north-1.amazonaws.com.cn, s3.cn-north-1.amazonaws.com.cn]"
And this is my code
export const Aws3UploadApi = (file) => { return new Promise((resolve, reject) => { RNS3.put(file, AwsOptions).then(response => { console.log('raw response', response) if (response.status !== 201) {return reject()} else { return resolve(response) } }).catch((err) => {console.log('has err', err)}) }) } let date = new Date() let file_name = `${date.getTime()}.jpeg` let file = { uri: filePath, name: file_name, type: 'image/jpeg' } Aws3UploadApi(file).then((response) => { console.log('resp', response) }).catch((err) => {console.log('has error', err)})
same error here!
@jiyarong solved! I just removed all the dots (".") from my bucket name (replaced it with "-" instead)
"Hostname cn.wfl-ischool.app.oralv1.s3.cn-north-1.amazonaws.com.cn not verified: certificate: sha256/7ZXQS/UDzRMV2KyFbtuVg0QKioBlbEeVNh2VJoGwHzI= DN: CN=.s3.cn-north-1.amazonaws.com.cn,O=Amazon Connect Technology Services (Beijing) Co.\, Ltd.,L=Huairou District,ST=Beijing,C=CN subjectAltNames: [.s3.cn-north-1.amazonaws.com.cn, s3.cn-north-1.amazonaws.com.cn]"
And this is my code