前端JS使用STS鑑權上傳文件到OSS--HTTPS域名下上傳失敗的問題

直接給出解決方式:

let client = new OSS({
    accessKeyId: data.data.AccessKey,
    accessKeySecret: data.data.AccessKeySecret,
	stsToken: data.data.SecurityToken,
	bucket: data.data.bucket,
	endpoint: data.data.endpoint
});
client.options.endpoint.protocol="https:" 

其實主要就是增加了:client.options.endpoint.protocol="https:" 代碼

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章