Cordova - download with direct link

情到浓时终转凉″ 提交于 2021-02-10 19:32:04

问题


I want a direct download from an external link in my project. however, when I click the link, Chrome, Explorer browser opens first. Then the file begins to descend.

The platform and plugins I use in the project are below. I would like your support.

<!DOCTYPE html>
<html>
    <head>
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <title>Hello World</title>
    </head>
    <body>
        <div class="app">
            <h1>Apache Cordova</h1>
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>
                <a href="http://www.kiajans.com.tr/a/uploaded.rar">Download link</a>
            </div>
        </div>
        
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
                
    </body>
</html>

来源:https://stackoverflow.com/questions/52576886/cordova-download-with-direct-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!