I want to download images inside my webview. I used a link tag like this
<a href="../Temp/Images/def.jpg" download="">Download</div></a>
Which works fine on a chrome browser but does not work in my webview app. I already activated several permissions.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
But still the link does not react. How can I trigger a download?
EDIT:
Response Headers:
Cache-Control:private
Connection:Close
Content-Disposition:attachment; filename=IMG_20141004_171308.jpg
Content-Length:3039432
Content-Type:image/jpeg
Date:Wed, 15 Oct 2014 12:35:57 GMT
Server:ASP.NET Development Server/10.0.0.0
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:4.0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…