Commit b6c8c65d authored by yinjiacheng's avatar yinjiacheng

fix 金山云存储文件上传权限控制

parent 36fe67f8
...@@ -156,7 +156,7 @@ class Ks3Core private constructor() : AuthListener { ...@@ -156,7 +156,7 @@ class Ks3Core private constructor() : AuthListener {
fun uploadObject(path: String, type: ObjectType) { fun uploadObject(path: String, type: ObjectType) {
val file = File(path) val file = File(path)
val request = PutObjectRequest(BUCKET_NAME, getObjectKey(file.name, type), file) val request = PutObjectRequest(BUCKET_NAME, getObjectKey(file.name, type), file)
request.cannedAcl = CannedAccessControlList.Private request.cannedAcl = CannedAccessControlList.PublicRead
client.putObject(request, putObjectResponseHandler) client.putObject(request, putObjectResponseHandler)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment