summaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main')
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
index a002788..de9edf3 100644
--- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js
@@ -58,10 +58,13 @@ function files_fileDownload() {
}
function files_fileUpload() {
- var requestURL = window.restRootURL + "/Model/Upload?userId=" + new URLSearchParams(window.location.search).get('userId');
-
+ let requestURL = window.restRootURL + "/Model/Upload";
+ const userId = new URLSearchParams(window.location.search).get('userId');
+ if (userId) {
+ requestURL = requestURL + "?userId=" + userId;
+ }
ajax_getOKOrFail(requestURL, function(data) {
- var uploadResultString = "";
+ let uploadResultString = "";
for (let value of data.messages.message) {
uploadResultString += (value + "\n");
}