haruki需要替换台服的host
This commit is contained in:
@@ -2,6 +2,9 @@ package net.bluemangoo.indpjsk.upload
|
||||
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import net.bluemangoo.indpjsk.App
|
||||
import net.bluemangoo.indpjsk.data.CaptureResult
|
||||
import net.bluemangoo.indpjsk.data.SettingsStore
|
||||
import net.bluemangoo.indpjsk.vpn.VpnLog
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
@@ -55,6 +58,15 @@ object Uploader {
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun tryUpload(result: CaptureResult) {
|
||||
val uploadCode = SettingsStore.loadUploadCode(App.appContext).trim()
|
||||
if (uploadCode.isNotEmpty()) {
|
||||
VpnLog.info("${result.profile.name}${result.step.name} 开始上传")
|
||||
upload(uploadCode, result.url, result.file)
|
||||
VpnLog.success("${result.profile.name}${result.step.name} 上传完成")
|
||||
}
|
||||
}
|
||||
|
||||
private fun postChunk(
|
||||
uploadCode: String,
|
||||
uploadId: String,
|
||||
|
||||
Reference in New Issue
Block a user