Giter Club home page Giter Club logo

Comments (7)

18Yi avatar 18Yi commented on August 19, 2024

@grtreexyz 请问你的wx.saveFile在手机上保存的时候,图片的后缀是正确的吗?

from weapp-demo-album.

grtreexyz avatar grtreexyz commented on August 19, 2024
wx.canvasToTempFilePath({
    canvasId: 'target',
    success: function(res) {
        wx.saveFile({
            tempFilePath: res.tempFilePath,
            success: function(res) {
                console.log('saved::' + res.savedFilePath);
            },
            complete: function(e) {
                console.log(e.errMsg);
            }
        });
    },
    complete: function(e) {
        console.log(e.errMsg)
    },
});

返回 saved::wxfile://store_e?????????????????????????????????.jpg

from weapp-demo-album.

18Yi avatar 18Yi commented on August 19, 2024

@grtreexyz 好吧,我是通过wx.downloadFile然后wx.saveFile保存的,然后真机上获取不到图片正确的后缀,感觉可以试试你的方法,先把图画在画布上,再保存应该可以得到正确的后缀。谢谢!

from weapp-demo-album.

cristaltina avatar cristaltina commented on August 19, 2024

@grtreexyz 请问你的问题解决了嘛?我也能成功保存到本地,但在相册中看不到

from weapp-demo-album.

xdkaka avatar xdkaka commented on August 19, 2024

搞了半天找到官方文档:不支持啊
https://developers.weixin.qq.com/blogdetail?action=get_post_info&lang=zh_CN&token=&docid=2fcdb7794d48c59f7624f53e94d0ae22
Q:微信小程序现在支持将图片保存到相册吗?
A:目前不支持保存图片到相册。

from weapp-demo-album.

18Yi avatar 18Yi commented on August 19, 2024

可以做个图片预览(全屏状态),让用户长按图片保存到相册 @cristaltina @xdkaka @puterjam

from weapp-demo-album.

VincentCope avatar VincentCope commented on August 19, 2024

@18Yi 目前只能通过让用户长按保存图片这一个方法吧?还有一键复制文本的功能也不好实现...必须要用户选择,局限性还是很大啊

from weapp-demo-album.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.