在 Android 上下载 APK 时的文件名
当我从网络服务器下载 Android 手机上的文件时,它会将其保存为
downloadfile.apk
文件在我的服务器上保存为 MyApp.apk
您知道如何使该文件在 Android 上的下载文件列表中显示为 MyApp.apk 吗?
我还应该提到,为了让文件下载并被手机理解,我将服务器上的 .htaccess 文件修改为
AddType application/vnd.android.package-archive apk
DirectoryIndex MyApp.apk
When I download a file on my Android phone from my webserver it save it as
downloadfile.apk
The file is saved on my server as MyApp.apk
Do you know how to make the file appear as MyApp.apk in the downloaded files list on Android?
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过将其添加到我的 .htaccess 中使其在我的服务器上工作
。您不应该将第二行放在您的中。另外,请确保最后有一个换行符,我以前在错过换行符时遇到过问题。
I got it to work on my server by adding this to my .htaccess
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.