Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 上传文件失败 #2509

Open
4 tasks done
Slldyd2077 opened this issue Jan 12, 2024 · 1 comment
Open
4 tasks done

[Bug]: 上传文件失败 #2509

Slldyd2077 opened this issue Jan 12, 2024 · 1 comment
Labels
bug? The issue author think this is a bug

Comments

@Slldyd2077
Copy link

请确保您已阅读以上注意事项,并勾选下方的确认框。

  • 我已经仔细阅读上述教程和 "提问前需知"
  • 我已经使用 dev分支版本 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)

go-cqhttp 版本

v1.2.0

运行环境

Windows (64)

运行架构

None

连接方式

HTTP

使用协议

2 | Android Watch

重现步骤

萌新,使用/upload_private_file或者/upload_group_file API上传文件都会显示打开文件失败

期望的结果是什么?

文件上传成功

实际的结果是什么?

{"data":null,"message":"打开文件失败","msg":"OPEN_FILE_ERROR","retcode":100,"status":"failed","wording":"打开文件失败"}

简单的复现代码/链接(可选)

# 设置API的URL
url = "http://127.0.0.1:8000/upload_private_file"

# 设置参数
params = {
    "user_id": user_id,  # 对方的QQ号
    "file": "./speak.txt",  # 本地文件路径
    "name": "speak.txt"  # 文件名称
}

# 发送POST请求
response = requests.post(url, data=params)

# 打印响应
print(response.text)

日志记录(可选)

No response

补充说明(可选)

是因为watch协议还是什么的原因?求大佬指点

@Slldyd2077 Slldyd2077 added the bug? The issue author think this is a bug label Jan 12, 2024
@Slldyd2077 Slldyd2077 changed the title [Bug]: [Bug]: 上传文件失败 Jan 12, 2024
@YinWie
Copy link

YinWie commented Jan 16, 2024

#2471 看这个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? The issue author think this is a bug
Projects
None yet
Development

No branches or pull requests

2 participants