字节小程序
开发者社区
小程序小游戏
登录
使用chooseImage得到的临时文件获取失败

使用chooseImage得到的临时文件获取失败

3089浏览作者: 用户5959466179857

报错截图或相关BUG

通过chooseImage接口能正常返回临时图片路径,从电脑目录里也能看到生成的临时图片,但通过getFileInfo获取图片信息时却失败了。

执行代码如下:

			tt.chooseImage({
				success(res) {
					console.log('res.tempFilePaths:', res.tempFilePaths);
					tt.getFileInfo({
						filePath: res.tempFilePaths[0],
						success(res) {
							console.log('getFileInfo 信息:', res);
						}
					});
				}
			});

复现步骤

如下是执行后的调试内容,图片明明存在,但getFileInfo得到的size为0,digest也为空,电脑操作系统是window 11


最后一次编辑于 2022年03月09日
加载中