project-mirai / mirai-api-http

Mirai HTTP API (console) plugin
GNU Affero General Public License v3.0
1.66k stars 343 forks source link

上传送群文件报错,Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail #642

Closed wordweb closed 2 years ago

wordweb commented 2 years ago

使用自己写的代码提交报错,然后尝试用post工具提交依然报这个错

image

接口返回的错误如下

{ "code": 500, "msg": "Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail" }

控制台输出以下错误:

2022-11-12 02:11:49 E/MAH Access: java.lang.IllegalStateException: Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail java.lang.IllegalStateException: Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail at net.mamoe.mirai.internal.contact.file.AbsoluteFolderImpl$Companion.uploadNewFileImpl(AbsoluteFolderImpl.kt:153) at net.mamoe.mirai.internal.contact.file.AbsoluteFolderImpl$Companion$uploadNewFileImpl$1.invokeSuspend(AbsoluteFolderImpl.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

2022-11-12 02:12:07 E/MAH Access: java.lang.IllegalStateException: Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail java.lang.IllegalStateException: Failed AbsoluteFolderImpl.upload, result=-134, msg=upload check_security fail at net.mamoe.mirai.internal.contact.file.AbsoluteFolderImpl$Companion.uploadNewFileImpl(AbsoluteFolderImpl.kt:153) at net.mamoe.mirai.internal.contact.file.AbsoluteFolderImpl$Companion$uploadNewFileImpl$1.invokeSuspend(AbsoluteFolderImpl.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33) at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

wordweb commented 2 years ago

已经解决了,是因为文件的路径包含了中文导致。文件路径中不能包含中文。

Apicer commented 1 year ago

是文件名不能包含中文吗?