How does webapp download pictures to mobile photo albums?

problem description

has made a webapp that runs mainly on the mobile phone, and now there are two places where you need to download the image to the local. One place needs to generate the QR code at the front end and merge it, so the canvas is converted to the image code of base64, and the other is the image link uploaded to Aliyun.
itself, WebView or browsers have the ability to save long-press images, but now when these two pages are embedded in app, Android can no longer long press to save pictures.
so I studied whether the H5 terminal could download pictures locally. The research was very hard, and the result was very uncomfortable. So far, I haven"t found a really feasible way.

the environmental background of the problems and what methods you have tried

try method 1:

<a href="xxxx" download></a>

the PC side directly jumps out of the page to open the picture, while the mobile end directly has no response
try method 2:

<iframe src="imgUrl" name="frame"></iframe>

function downloadImage() {
    window.frames["frame"].document.execcommand("SaveAs")
}

directly save across domains, and I don"t know whether the actual effect is OK!

Hope

if you can, I hope God will show me the way; if not, please say clearly, let me die this heart!


Let the native provide you with a method.


I also encounter this problem. Have you solved the landlord problem?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb65f9-25c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb65f9-25c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?