在 Android 上下载 APK 时的文件名

发布于 2024-09-15 08:03:15 字数 327 浏览 3 评论 0原文

当我从网络服务器下载 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青春有你 2024-09-22 08:03:15

我通过将其添加到我的 .htaccess 中使其在我的服务器上工作

AddType application/vnd.android.package-archive apk

。您不应该将第二行放在您的中。另外,请确保最后有一个换行符,我以前在错过换行符时遇到过问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文