Home How to specify a suggested filename when using data: URI? in audio tag
Reply: 0

How to specify a suggested filename when using data: URI? in audio tag

Den B
1#
Den B Published in 2017-12-06 14:27:08Z

Well... I have some list of audio files: enter image description here

Sorry for link. I don't have enough permissions to paste image. When I press download button it downloads file with name like "noname" See the picture below: enter image description here

I want to specify filename when download button is pressed but can't find any solytions to do that. My code is:

var control =  "<audio controls=\"\"";
                    if (isSaveRecordEnable != "true") {
                        control += " controlsList=\"nodownload\" ";
                    }
                    control += ">"+
                        "<source src=\"data:audio/wav;base64," + wav.run() +"\" type=\"audio/wav\">" +
                        "</audio>";

                    return control;

I tried to put name attribute, but it doesn't work. I also read about download attribute but it works only with

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.317414 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO