易软
易软
  • 发布:2024-10-25 16:58
  • 更新:2024-11-07 16:27
  • 阅读:165

【报Bug】ios17的苹果手机上传图片 获取图片大小是0KB

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.8.7

手机系统: iOS

手机系统版本号: iOS 17

手机厂商: 苹果

手机机型: 苹果14 pro max

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

App下载地址或H5⽹址: https://itunes.apple.com/us/app/yry/id1444823228?l=zh&ls=1&mt=8

示例代码:

使用uni的方法选择了图片后

uni.chooseImage({  
                        count: 30,  
                        sourceType: ['camera'],  
                        success: res => {  
                            if (res.errMsg == 'chooseImage:ok') {  
                                // #ifdef APP-PLUS  
                                res.tempFilePaths.map(item => {  
                                    uni.saveFile({  
                                        tempFilePath: item,  
                                        success: res => {  
                                            var savedFilePath = res.savedFilePath;  
                                            this.imgList.push(savedFilePath);  
                                            if (this.imgList.length > 30) {  
                                                this.imgList = this.imgList.slice(0, 30);  
                                            }  
                                        }  
                                    });  
                                });  
                                // #endif     
                            }  
                        }  
                    });

进行上传

uploadTask.onProgressUpdate(res => {  
                    //this.process = res.progress;  
                    this.circular[this.tag].process = res.progress;  
                    this.circular[this.tag].total = res.totalBytesExpectedToSend;  
                    this.circular[this.tag].single = res.totalBytesSent;  
                });

获取的图片大小是0KB 无法上传
如果是ios17以下就可以

操作步骤:

正常上传

预期结果:

能够正常上传图片

实际结果:

无法上传

bug描述:

无法上传图片

2024-10-25 16:58 负责人:DCloud_iOS_XHY 分享
已邀请:
易软

易软 (作者)

有没有人知道啊,是不是要升级HBuilder?

  • DCloud_iOS_XHY

    升级到最新版本测试一下吧

    2024-11-14 11:51

要回复问题请先登录注册