当前位置:网站首页>Wechat applet UploadFile server, wechat applet wx Uploadfile[easy to understand]
Wechat applet UploadFile server, wechat applet wx Uploadfile[easy to understand]
2022-07-06 23:57:00 【Java architects must see】
wx.uploadFile(Object object)
Upload local resources to the server . The client initiates a HTTPS POST request , among content-type by multipart/form-data
url: Developer server address
filePath: Path to upload file resource
name: File corresponding key, Developers can use this on the server side key Get the binary content of the file
header:HTTP request Header,Header Cannot set Referer
formData:HTTP Other extras in the request form data
success: Interface calls the successful callback function
fail: Interface call failed callback function
complete: The callback function at the end of the interface call ( Successful call 、 Failure will be carried out )
example
wx.chooseImage({
success (res) {
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: 'https://example.weixin.qq.com/upload',
filePath: tempFilePaths[0],
name: 'file',
formData: {
'user': 'test'
},
success (res){
const data = res.data
//do something
}
})
}
})
边栏推荐
- 三句话简要介绍子网掩码
- 微信小程序uploadfile服务器,微信小程序之wx.uploadFile[通俗易懂]
- 1000 words selected - interface test basis
- Oracle中使用包FY_Recover_Data.pck来恢复truncate误操作的表
- How about the order management of okcc call center
- DAY TWO
- Pdf document signature Guide
- 量子时代计算机怎么保证数据安全?美国公布四项备选加密算法
- [CVPR 2022] semi supervised object detection: dense learning based semi supervised object detection
- Pytest multi process / multi thread execution test case
猜你喜欢
GPIO簡介
The programmer said, "I'm 36 years old, and I don't want to be rolled, let alone cut."
零代码高回报,如何用40套模板,能满足工作中95%的报表需求
Design a red envelope grabbing system
app通用功能測試用例
[communication] optimal power allocation in the uplink of two-layer wireless femtocell network with matlab code
英国都在试行4天工作制了,为什么BAT还对996上瘾?
Introduction to GPIO
氢创未来 产业加速 | 2022氢能专精特新创业大赛报名通道开启!
The largest single investment in the history of Dachen was IPO today
随机推荐
在Docker中分分钟拥有Oracle EMCC 13.5环境
Building lease management system based on SSM framework
华为mate8电池价格_华为mate8换电池后充电巨慢
使用yum来安装PostgreSQL13.3数据库
How rider uses nuget package offline
本地部署 zeppelin 0.10.1
openresty ngx_lua子请求
Pdf document signature Guide
Penetration test --- database security: detailed explanation of SQL injection into database principle
Compile logisim
Rider离线使用Nuget包的方法
GPIO简介
DAY THREE
leetcode:236. The nearest common ancestor of binary tree
英国都在试行4天工作制了,为什么BAT还对996上瘾?
Today, I met a senior test developer from Tencent and saw the ceiling of the foundation
短链的设计
微信小程序uploadfile服务器,微信小程序之wx.uploadFile[通俗易懂]
内网穿透zerotier 外网(手机、电脑等)访问内网设备(树莓派、NAS、电脑等)
士大夫哈哈哈