有没有解决了的
wx.downloadFile下载.png图片 返回.BIN格式的文件 导致保存失败手机上使用wx.downloadFile下载oss上的.png图片,返回是.bin格式的文件,到时后续用wx.saveImageToPhotosAlbum保存图片失败,报{errMsg: "saveImageToPhotosAlbum:fail invalid file type"},但是在开发工具上可以直接返回png格式图片,可以保存。 如下为用wx.downloadFile请求和返回的结果。 wx.downloadFile({ url: 'https://prod-auops.oss-cn-shenzhen.aliyuncs.com/wxacode/5/gm.png?Expires=4724616620&OSSAccessKeyId=LW6Q1beRi0R3m14r&Signature=S/v7ibcS1c7nP12EvBsLp3sk3j0%3D', success(res) { if (res.statusCode === 200) { console.log(res) wx.saveImageToPhotosAlbum({ filePath: res.tempFilePath, success(res) { console.log(res) wx.showToast({ icon: 'none', title: "图片已保存" }) }, fail(res){ console.log(res) } }) } } }) 返回结果 {tempFilePath: "wxfile://tmp_54d93ed93a853a3a9765337741943c492df65fcd1db83a0a.bin", header: {…}, statusCode: 200, errMsg: "downloadFile:ok"} errMsg: "downloadFile:ok" header: Accept-Ranges: "bytes" Connection: "keep-alive" Content-Disposition: "attachment;filename=gm.png" Content-Length: "103837" Content-MD5: "T4RW3zvQtapK4rYXVczxJA==" Content-Type: "application/octet-stream" Date: "Mon, 14 Oct 2019 01:12:50 GMT" ETag: ""4F8456DF3BD0B5AA4AE2B61755CCF124"" Last-Modified: "Sun, 13 Oct 2019 14:30:55 GMT" Server: "AliyunOSS" X-Android-Received-Millis: "1571015568965" X-Android-Response-Source: "NETWORK 200" X-Android-Selected-Protocol: "http/1.1" X-Android-Sent-Millis: "1571015568954" x-oss-hash-crc64ecma: "13627780087634526589" x-oss-object-type: "Normal" x-oss-request-id: "5DA3CB929ACC073532C38DAE" x-oss-server-time: "2" x-oss-storage-class: "Standard" __proto__: Object statusCode: 200 tempFilePath: "wxfile://tmp_54d93ed93a853a3a9765337741943c492df65fcd1db83a0a.bin" __proto__: Object
02-22Error: 代码包大小长沙市超过限制,main package source size 2215KB exceed max limit 2048KB [20241120 09:22:48][wxd256e72eab90fac8] [1.06.2405020][winError: 代码包大小超过限制,main package source size 2215KB exceed max limit 2048KB [20241120 09:22:48][wxd256e72eab90fac8] [1.06.2405Error: 代码包大小超过限制,main package source size 2215KB exceed max limit 2048KB [20241120 09:22:48][wxd256e72eab90fac8] [1.06.2405020][win32-x64]020][win32-x64]32-x64]Error: 代码包大小超过限制,main package source size 2215KB exceed max limit 2048KB [20241120 09:22:48][wxd256e72eab90fac8] [1.06.2405020][win32-x64]
小程序上传提示超2M,实际没有超过,突然就不能上传了咋回事?message:Error: 系统错误,错误码:80058,preloadRule [pages/index/index] source size 2100KB exceed max limit 2MB [20210601 09:49:33][wx27a0c3a9442e081b] appid: wx27a0c3a9442e081b ideVersion: 1.05.2105170 小程序上传提示超2M,实际没有超过,突然就不能上传了咋回事? [图片]
2024-11-20