mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-25 01:44:24 +00:00
Fix gradle script buid again
This commit is contained in:
1 parent
94f6044c9a
commit
d67b7c6296
1 file changed
+5
-9
@@ -45,23 +45,19 @@ String getKey(String filename) {
|
||||
return filename
|
||||
}
|
||||
|
||||
String bucketName = System.getenv("COS_BUCKET")
|
||||
String cosUrl = "https://csl.littleservice.cn/"
|
||||
COSClient cosClient = null
|
||||
bucketName = System.getenv("COS_BUCKET")
|
||||
cosUrl = "https://csl.littleservice.cn/"
|
||||
cosClient0 = null
|
||||
|
||||
COSClient getCosClient() {
|
||||
if (cosClient != null) return cosClient
|
||||
if (cosClient0 != null) return cosClient0
|
||||
|
||||
COSCredentials cred = new BasicCOSCredentials(System.getenv("COS_SECRET_ID"), System.getenv("COS_SECRET_KEY"))
|
||||
ClientConfig clientConfig = new ClientConfig(new Region("ap-shanghai"))
|
||||
cosClient = new COSClient(cred, clientConfig)
|
||||
cosClient0 = new COSClient(cred, clientConfig)
|
||||
}
|
||||
|
||||
void uploadFile(String key, File file) {
|
||||
//COSCredentials cred = new BasicCOSCredentials(System.getenv("COS_SECRET_ID"), System.getenv("COS_SECRET_KEY"))
|
||||
//ClientConfig clientConfig = new ClientConfig(new Region("ap-shanghai"))
|
||||
//COSClient cosClient = new COSClient(cred, clientConfig)
|
||||
|
||||
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, key, file)
|
||||
getCosClient().putObject(putObjectRequest)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user