Commit ef86de23 authored by Him188's avatar Him188

Fix cuiCloud

parent 8bc10f7b
...@@ -94,9 +94,7 @@ object CuiCloud { ...@@ -94,9 +94,7 @@ object CuiCloud {
filePath: String, filePath: String,
content: ByteArray content: ByteArray
) { ) {
println("uploading to $cuiCloudUrl")
println("filePath=$filePath") println("filePath=$filePath")
println("key=$cuiToken")
println("content=${content.size / 1024 / 1024} MB") println("content=${content.size / 1024 / 1024} MB")
val response = withContext(Dispatchers.IO) { val response = withContext(Dispatchers.IO) {
...@@ -110,7 +108,6 @@ object CuiCloud { ...@@ -110,7 +108,6 @@ object CuiCloud {
) )
} }
} }
if (response.status.isSuccess()) {
println(response.status) println(response.status)
val buffer = ByteArray(4096) val buffer = ByteArray(4096)
...@@ -124,6 +121,8 @@ object CuiCloud { ...@@ -124,6 +121,8 @@ object CuiCloud {
} }
} }
println(String(resp.toByteArray())) println(String(resp.toByteArray()))
if (!response.status.isSuccess()) {
error("Cui cloud response: ${response.status}") error("Cui cloud response: ${response.status}")
} }
} }
......
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