|
|
@ -13,8 +13,11 @@ object DirectLinkUpload { |
|
|
|
|
|
|
|
|
|
|
|
suspend fun upLoad(fileName: String, byteArray: ByteArray): String { |
|
|
|
suspend fun upLoad(fileName: String, byteArray: ByteArray): String { |
|
|
|
val res = okHttpClient.newCallStrResponse { |
|
|
|
val res = okHttpClient.newCallStrResponse { |
|
|
|
url("https://shuyuan.miaogongzi.site/index.html") |
|
|
|
url("https://shuyuan.miaogongzi.site/upload.php") |
|
|
|
postMultipart(mapOf("file" to Triple(fileName, byteArray, null))) |
|
|
|
postMultipart( |
|
|
|
|
|
|
|
"multipart/form-data", |
|
|
|
|
|
|
|
mapOf("file" to Triple(fileName, byteArray, "application/json")) |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
val analyzeRule = AnalyzeRule(RuleData()).setContent(res.body, res.url) |
|
|
|
val analyzeRule = AnalyzeRule(RuleData()).setContent(res.body, res.url) |
|
|
|
return analyzeRule.getString("tag.b@text") |
|
|
|
return analyzeRule.getString("tag.b@text") |
|
|
|