diff --git a/Assets/WebsiteAssets/js/script.js b/Assets/WebsiteAssets/js/script.js
index 973a57aa6..b386719a5 100644
--- a/Assets/WebsiteAssets/js/script.js
+++ b/Assets/WebsiteAssets/js/script.js
@@ -9,7 +9,9 @@ function getOs() {
function getFilename(path) {
if (!path) return '';
const s = path.split('/');
- return s.pop();
+ const urlWithParams = s.pop();
+ const s2 = urlWithParams.split('?');
+ return s2[0];
}
function getMobileOs() {
diff --git a/README.md b/README.md
index f0e4d858f..b9f21ef38 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ Linux | | or download the APK file: [64-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8.apk?source=JoplinWebsite&type=New) [32-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8-32bit.apk?source=JoplinWebsite&type=New)
+Android | | or download the APK file: [64-bit](https://objects.joplinusercontent.com/android-v2.9.8/joplin-v2.9.8.apk?source=JoplinWebsite&type=New) [32-bit](https://objects.joplinusercontent.com/android-v2.9.8/joplin-v2.9.8-32bit.apk?source=JoplinWebsite&type=New)
iOS | | -
## Terminal application
diff --git a/packages/tools/update-readme-download.ts b/packages/tools/update-readme-download.ts
index e275860e2..0967abce2 100644
--- a/packages/tools/update-readme-download.ts
+++ b/packages/tools/update-readme-download.ts
@@ -19,6 +19,7 @@ function downloadUrl(release: GitHubRelease, os: string, portable = false) {
const name = asset.name;
const ext = fileExtension(name);
+ const githubAndroidUrl = 'github.com/laurent22/joplin-android/releases/download';
const githubUrl = 'github.com/laurent22/joplin/releases/download';
const joplinDomain = 'objects.joplinusercontent.com';
@@ -34,9 +35,9 @@ function downloadUrl(release: GitHubRelease, os: string, portable = false) {
if (ext === 'AppImage' && os === 'linux') return asset.browser_download_url.replace(githubUrl, joplinDomain);
- if (os === 'android32' && name.endsWith('32bit.apk')) return asset.browser_download_url.replace(githubUrl, joplinDomain);
+ if (os === 'android32' && name.endsWith('32bit.apk')) return asset.browser_download_url.replace(githubAndroidUrl, joplinDomain);
- if (os === 'android' && ext === 'apk' && !name.endsWith('32bit.apk')) return asset.browser_download_url.replace(githubUrl, joplinDomain);
+ if (os === 'android' && ext === 'apk' && !name.endsWith('32bit.apk')) return asset.browser_download_url.replace(githubAndroidUrl, joplinDomain);
}
throw new Error(`Could not find download URL for: ${os}`);