在Android上下载APK时的文件名 [英] Filename when downloading APK on Android

查看:370
本文介绍了在Android上下载APK时的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从我的网络服务器在我的Android手机上下载一个文件时,它保存为

When I download a file on my Android phone from my webserver it save it as

 downloadfile.apk

该文件作为MyApp.apk保存在我的服务器上

The file is saved on my server as MyApp.apk

您是否知道如何使文件在Android的下载文件列表中显示为MyApp.apk?

Do you know how to make the file appear as MyApp.apk in the downloaded files list on Android?

我还应该提到要获取文件下载并将其通过电话了解我修改了服务器上的.htaccess文件为

I should also mention that to get the file to download and be understood by the phone I modified the .htaccess file on the server to be

 AddType application/vnd.android.package-archive apk
 DirectoryIndex MyApp.apk


推荐答案

我得到了在我的服务器上工作,将它添加到我的.htaccess

I got it to work on my server by adding this to my .htaccess

AddType application/vnd.android.package-archive apk

你不应该把第二行放在你的身上。另外,确保你在最后有一个换行符,之前我有错误的。

You shouldn't have put the 2nd line in yours. Also, make sure you have a line break at the very end, I have had issues before when missing that.

这篇关于在Android上下载APK时的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆