https://github.com/tencentyun/qcloud-cos-sts-sdk
临时密钥可以指定目录权限,但是不是以签名的形式,有临时密钥,还要每次请求前计算签名。
上传文件,内容写 json 字符串就好了。
比如 js sdk
cos.putObject({
Bucket: '',
Region: '',
Key: '1.json',
Body: '{"abc": "hello!"}',
}, function (err, data) {
console.log(err || data);
});
远程服务器什么意思?具体什么场景?
一般只要用存储桶的域名发请求到对应园区的 IP 上,就能正常使用。
腾讯云相同园区的 CVM,上传同园区 COS 时,域名会自动解析为内网 IP。