选择本地图片转换base64异常
发布于 4 年前 作者 hyang 1610 次浏览 来自 官方Issues

首先使用苹果手机拍摄一张照片,然后调用下方代码片段

wx.chooseImage({

      count: 1,

      sizeType: [‘original’],

      sourceType: [‘album’],

        var card_Src = res.tempFilePaths[0];

        wx.getFileSystemManager().readFile({

		filePath: card\_Src,

	    encoding: 'base64',

	    success: res => {

			var card\_Src = res.tempFilePaths\[0\];

		},

		fail: res => {

 

		},

	})

点击【相册选择】,选择刚才拍摄的图片,

发现图片没有转换成base64,也没有进入fail回调

1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部