Lekensteyn / apk-downloader

APK Downloader Chrome Extension
https://lekensteyn.nl/apk-downloader/
328 stars 86 forks source link

Downloading with unknown extension #14

Closed majinsaiyan closed 10 years ago

majinsaiyan commented 10 years ago

I am using latest version and found out that the file is downloading with an unknown extension and the name isn't displayed properly. It's using version number of that particular app as downloaded name. Although renaming it to .apk solves this. Any workaround? Using chrome 36.0.1985.125 m

Lekensteyn commented 10 years ago

What name is shown and what would you expect instead? It should be something like com.example.app-1234.apk.

majinsaiyan commented 10 years ago

Its showing the file version name as downloaded name. For example, https://play.google.com/store/apps/details?id=com.gaana&hl=en If i download this app, the app name is downloaded as 407( its current version 4.07 ). I am using this extension after a long time, but i'm sure it worked normally before (with original apk name as downloaded name). And what about the name extension? Its only showing 407. There is no .apk extension while downloading. I need to rename it every time i download

Lekensteyn commented 10 years ago

I can confirm this bug which is odd, since the message printed in the console indicates that a file with an apk download is offered. Perhaps the Chrome API has changed. Let's see.

Lekensteyn commented 10 years ago

Reproduced with:

var a=document.createElement("a");a.href="http://example.net/meh.bar"; a.download = "foo.txt";a.click();

Chromium 36.0.1985.125-1. Maybe (or maybe not) related: http://stackoverflow.com/q/23816005/427545 https://code.google.com/p/chromium/issues/detail?id=373182. Especially the commit message in comment 49 seems to explain the "bug" / "feature".

To fix this, the extension should add a Content-Disposition header. Not sure whether this will require additional permissions though.

The "4" comes from the redirected URL:

majinsaiyan commented 10 years ago

Will u upload fixed version then? And there is another bug and i think you are aware of it. Chrome disables 3rd party extensions. So, even if we drag and drop to install, after sometime probably after restarting chrome, it disables automatically and never can be used again.

Lekensteyn commented 10 years ago

I have not yet had the opportunity to look deeper into this, and it is not high on my priority list. Maybe @Rob--W wants to look at this?

Google's approach to third party extensions (read: extensions not in their extension gallery) is also not motivating either.

Rob--W commented 10 years ago

I have published some changes that ought to resolve the issue. Let me know if the issues are fixed with this update. Peter will publish the update and changelog within an hour.

Lekensteyn commented 10 years ago

I have verified that Rob fixed the issue.

v2.1 is released with this and another improvement. Let me know if there are any other problems. Changelog and links are available on https://lekensteyn.nl/apk-downloader/

majinsaiyan commented 10 years ago

Thanks for the new version. It's working now with original apk name.