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

uni.uploadFile方法不发送POST请求而是GET请求 #5321

Open
iamwxq opened this issue Feb 27, 2025 · 1 comment
Open

uni.uploadFile方法不发送POST请求而是GET请求 #5321

iamwxq opened this issue Feb 27, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@iamwxq
Copy link

iamwxq commented Feb 27, 2025

发行方式

小程序

具体平台

uni.uploadFile方法不发送POST请求而是GET请求


IOS18.3
微信小程序基础库3.7.8
微信版本8.0.56

开发环境

Windows

项目创建方式

CLI命令行

依赖版本

"@dcloudio/uni-app": "3.0.0-4040520250104002",
"@dcloudio/uni-app-plus": "3.0.0-4040520250104002",
"@dcloudio/uni-components": "3.0.0-4040520250104002",
"@dcloudio/uni-h5": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-alipay": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-baidu": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-jd": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-lark": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-qq": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-toutiao": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-weixin": "3.0.0-4040520250104002",
"@dcloudio/uni-mp-xhs": "3.0.0-4040520250104002",
"@dcloudio/uni-quickapp-webview": "3.0.0-4040520250104002",
"@uni-helper/uni-network": "^0.20.0",

问题描述

uni.uploadFile方法不发送POST请求而是GET请求

重现步骤

调用uni.uploadFile不发送POST请求,而是发送GET

期望行为

发送POST请求

实际行为

发送了GET请求

截图或录屏

其中 http 是对 uni-network 的封装

Image

Image

Image

@iamwxq iamwxq added the bug Something isn't working label Feb 27, 2025
@GRCmade
Copy link
Collaborator

GRCmade commented Feb 28, 2025

看你这个方法,是经过自己封装之后发出的,你只使用 uni.uploadFile 尝试一下

Image

@GRCmade GRCmade self-assigned this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants