aboutsummaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/core-bundle.js10
-rw-r--r--modules/core/module-fs.js10
-rw-r--r--modules/core/module-loader.js2
3 files changed, 19 insertions, 3 deletions
diff --git a/modules/core/core-bundle.js b/modules/core/core-bundle.js
index ee2e9d0..3f7e352 100644
--- a/modules/core/core-bundle.js
+++ b/modules/core/core-bundle.js
@@ -6716,7 +6716,15 @@ class FileSystemModule {
const baseUrl = wdav.config.url.replace(/\/+$/, '');
const hostMatch = baseUrl.match(/^(https?:\/\/[^\/]+)/);
const host = hostMatch ? hostMatch[1] : 'https://webx11.duckdns.org';
- downloadUrl = host + '/spaces/' + wdav._spaceName + '/downloads/' + encodeURIComponent(fname);
+ // Build the public URL the user can tap.
+ // The URL must use the space the PUT actually went to
+ // (config.url = the logged-in user's space). _spaceName is
+ // derived from the page path (/spaces/newos4/…) and is wrong
+ // for users downloading into their own space (2026-10-21).
+ const urlSpace = (typeof wdav._resolveSpaceName === 'function' && wdav._resolveSpaceName()) ||
+ (wdav._extractSpaceNameFromUrl && wdav._extractSpaceNameFromUrl(wdav.config.url)) ||
+ wdav._spaceName;
+ downloadUrl = host + '/spaces/' + urlSpace + '/downloads/' + encodeURIComponent(fname);
this.terminal.print('Uploaded to: ' + downloadUrl, 'success');
} else {
this.terminal.print('WebDAV push failed: HTTP ' + resp.status, 'warning');
diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js
index d94feb8..2b525f0 100644
--- a/modules/core/module-fs.js
+++ b/modules/core/module-fs.js
@@ -447,7 +447,15 @@ class FileSystemModule {
const baseUrl = wdav.config.url.replace(/\/+$/, '');
const hostMatch = baseUrl.match(/^(https?:\/\/[^\/]+)/);
const host = hostMatch ? hostMatch[1] : 'https://webx11.duckdns.org';
- downloadUrl = host + '/spaces/' + wdav._spaceName + '/downloads/' + encodeURIComponent(fname);
+ // Build the public URL the user can tap.
+ // The URL must use the space the PUT actually went to
+ // (config.url = the logged-in user's space). _spaceName is
+ // derived from the page path (/spaces/newos4/…) and is wrong
+ // for users downloading into their own space (2026-10-21).
+ const urlSpace = (typeof wdav._resolveSpaceName === 'function' && wdav._resolveSpaceName()) ||
+ (wdav._extractSpaceNameFromUrl && wdav._extractSpaceNameFromUrl(wdav.config.url)) ||
+ wdav._spaceName;
+ downloadUrl = host + '/spaces/' + urlSpace + '/downloads/' + encodeURIComponent(fname);
this.terminal.print('Uploaded to: ' + downloadUrl, 'success');
} else {
this.terminal.print('WebDAV push failed: HTTP ' + resp.status, 'warning');
diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js
index 7416e02..3aedc0d 100644
--- a/modules/core/module-loader.js
+++ b/modules/core/module-loader.js
@@ -4,7 +4,7 @@
// Core module bundle loaded synchronously in main.html.
// This loader only handles version cache-busting, splash, terminal init, and optional ext modules.
- const LATEST_VER = 'v4.6.44';
+ const LATEST_VER = 'v4.6.45';
const CACHE = '?v=' + LATEST_VER;
const stored = localStorage.getItem('webx11_cache_ver');
if (stored !== LATEST_VER) {