8***@qq.com
8***@qq.com
  • 发布:2021-11-03 05:23
  • 更新:2021-11-03 05:23
  • 阅读:329

【报Bug】在微信中以h5方式上传音频文件时无法获得扩展名

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 3.2.12

浏览器平台: 微信内置浏览器

浏览器版本: 8.0.11

项目创建方式: HBuilderX

示例代码:
var self = this;  
                uni.chooseFile({  
                    extension: ['.mp3', '.m4a', '.acc', '.3gp', '.wma', '.amr'],  
                    count: 9,  
                    success(res) {  
                        self.anyilfile(res);  

                    }  
                });  
var self = this;  
                console.log(res)  
                for (var k in res.tempFiles[0]) {  
                    self.vlog += k.toString() + '\n\r,';  
                }  
                self.vlog += res.tempFilePaths + '\n\r,';  
                self.vlog += res.tempFiles[0].size + '\n\r,';  
                self.vlog += res.tempFiles[0].name + '\n\r,';  
                self.vlog += res.tempFiles[0].type + '\n\r,';  
                self.vlog += res.tempFiles[0].cloudPath + '\n\r#';  
                self.vlog += res.tempFiles[0].uuid + '\n\r#';  
                self.vlog += res.tempFiles[0].url + '\n\r#';  
                let ext = res.tempFiles[0].name.substr(res.tempFiles[0].name.lastIndexOf(".") + 1);  

                uni.showModal({  
                    content: self.vlog,  
                    showCancel: false  
                });

操作步骤:

我的微信h5方法上传必现

预期结果:

能解决就好

实际结果:

能解决就好

bug描述:

在微信中以h5方式上传音频文件时无法获得扩展名,还有很多参数为undefind。其它文件都可以

2021-11-03 05:23 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复