当前位置:网站首页>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
}
})
}
})
边栏推荐
- DAY THREE
- 【2022全网最细】接口测试一般怎么测?接口测试的流程和步骤
- Experiment 6: installing eve-ng
- Zero code and high return. How to use 40 sets of templates to meet 95% of the reporting needs in the work
- Please help xampp to do sqlilab is a black
- Experiment 4: installing packages from Gui
- Quickly use various versions of PostgreSQL database in docker
- Unity 颜色板|调色板|无级变色功能
- What is AVL tree?
- 三句话简要介绍子网掩码
猜你喜欢
亚朵三顾 IPO
Do you still have to rely on Simba to shout for a new business that is Kwai?
[unmanned aerial vehicle] multi unmanned cooperative task allocation program platform, including Matlab code
leetcode:236. The nearest common ancestor of binary tree
matplotlib画柱状图并添加数值到图中
The largest single investment in the history of Dachen was IPO today
Designed for decision tree, the National University of Singapore and Tsinghua University jointly proposed a fast and safe federal learning system
Interface joint debugging test script optimization v4.0
Asset security issues or constraints on the development of the encryption industry, risk control + compliance has become the key to breaking the platform
达晨史上最大单笔投资,今天IPO了
随机推荐
编译logisim
DAY FOUR
leetcode:236. 二叉树的最近公共祖先
Use Yum or up2date to install the postgresql13.3 database
《数字经济全景白皮书》保险数字化篇 重磅发布
Gold three silver four, don't change jobs
Wind chime card issuing network source code latest version - commercially available
本地部署 zeppelin 0.10.1
web渗透测试是什么_渗透实战
求帮助xampp做sqlilab是一片黑
数据运营平台-数据采集[通俗易懂]
基于SSM框架实现的房屋租赁管理系统
ArrayExpress数据库里的细胞只有两个txt是不是只能根据Line到ENA下载测序跑矩阵?
Every year, 200 billion yuan is invested in the chip field, and "China chip" venture capital is booming
DAY FOUR
Wasserstein slim gain with gradient poverty (wsgain-gp) introduction and code implementation -- missing data filling based on generated countermeasure network
Asset security issues or constraints on the development of the encryption industry, risk control + compliance has become the key to breaking the platform
After 3 years of testing bytecan software, I was ruthlessly dismissed in February, trying to wake up my brother who was paddling
Oracle EMCC 13.5 environment in docker every minute
MySQL主从之多源复制(3主1从)搭建及同步测试