微信小程序开发交流qq群   173683895

   承接微信小程序开发。扫码加微信。

正文:

目前微信API开放上传图片,录音文件,视频文件,but

只能下载并打开附件,不能上传附件,以后会不会开放附件上传目前还不确定,2018-1-15;

下面打开附件的方法:

 

Page({  data: {  },  onLoad:function(){    wx.downloadFile({       //下载附件      url: 'https://www.sz800800.cn/ZENGXING/0109...18.16.docx',      fileType:'docx',      success: function (res) {        console.log(res)          var filePath = res.tempFilePath        wx.openDocument({    //打开附件          filePath: filePath,          success: function (res) {            console.log(res)          },          complete:function(e){            console.log(e)          }        })      }    })  }})

 

 

 

 

 

TAG标签: 微信小程序附件上传

http://www.xiaochengxub.com/read-105538.html