小程序
小游戏
企业微信
微信支付
扫描小程序码分享
电脑微信小程序上传的文件为空数组文件!是何原因??求官方跟进问题!!官方的人在吗??
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
提供一下可复现问题的代码片段:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
wx.chooseVideo({
sourceType: that.data.source[that.data.type],
mediaType: ['video'],
maxDuration: 60,
compressed: true,
camera: 'back',
count: 1,
success: async function (r) {
if (r.errMsg == "chooseVideo:ok") {
if (r.size / that.data.mb > 9.7) {
wx.showToast({
title: '上传视频过大,请分段上传',
icon: "none"
})
return false
}
let temFile = r.tempFilePath
let audio_list = {}
let res = await requestApi.uploadFile(temFile, that)
if (res.status == "success") {
audio_list['src'] = res.data
audio_list['thumb_src'] = res.data+"?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast"
that.setData({
showPress: false
let tem = that.data.videoList
tem.push(audio_list)
videoList: tem
// 后端文件接收
$files = $_FILES['file'];
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
提供一下可复现问题的代码片段:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
wx.chooseVideo({
sourceType: that.data.source[that.data.type],
mediaType: ['video'],
maxDuration: 60,
compressed: true,
camera: 'back',
count: 1,
success: async function (r) {
if (r.errMsg == "chooseVideo:ok") {
if (r.size / that.data.mb > 9.7) {
wx.showToast({
title: '上传视频过大,请分段上传',
icon: "none"
})
return false
}
let temFile = r.tempFilePath
let audio_list = {}
let res = await requestApi.uploadFile(temFile, that)
if (res.status == "success") {
audio_list['src'] = res.data
audio_list['thumb_src'] = res.data+"?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast"
}
that.setData({
showPress: false
})
let tem = that.data.videoList
tem.push(audio_list)
that.setData({
videoList: tem
})
}
}
})
// 后端文件接收
$files = $_FILES['file'];