projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://osm.etsi.org/gerrit/osm/UI
[osm/UI.git]
/
skyquake
/
plugins
/
composer
/
src
/
src
/
libraries
/
CatalogPackageManagerUploadDropZone.js
diff --git
a/skyquake/plugins/composer/src/src/libraries/CatalogPackageManagerUploadDropZone.js
b/skyquake/plugins/composer/src/src/libraries/CatalogPackageManagerUploadDropZone.js
index
5f1ee24
..
a586750
100644
(file)
--- a/
skyquake/plugins/composer/src/src/libraries/CatalogPackageManagerUploadDropZone.js
+++ b/
skyquake/plugins/composer/src/src/libraries/CatalogPackageManagerUploadDropZone.js
@@
-1,6
+1,6
@@
/*
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-35,18
+35,24
@@
const ACTIONS = {
};
function getCatalogPackageManagerServerOrigin() {
};
function getCatalogPackageManagerServerOrigin() {
- return Utils.getSearchParams(window.location).upload_server + ':4567';
+ // return Utils.getSearchParams(window.location).upload_server + ':4567';
+ return window.location.origin;
}
function initializeDropZone(element = '#dropzone', button = false, action = ACTIONS.onboard) {
}
function initializeDropZone(element = '#dropzone', button = false, action = ACTIONS.onboard) {
+ let Auth = 'Basic ' + window.sessionStorage.getItem("auth");
+ let dev_download_server = Utils.getSearchParams(window.location).dev_download_server;
DropZone.autoDiscover = false;
return new DropZone(element, {
DropZone.autoDiscover = false;
return new DropZone(element, {
- paramName: '
descriptor
',
+ paramName: '
package
',
url() {
if (action === ACTIONS.update) {
url() {
if (action === ACTIONS.update) {
- return getCatalogPackageManagerServerOrigin() + '/
api/update'
;
+ return getCatalogPackageManagerServerOrigin() + '/
composer/update?api_server=' + Utils.getSearchParams(window.location).api_server + '&upload_server=' + Utils.getSearchParams(window.location).upload_server + ( dev_download_server ? '&dev_download_server=' + dev_download_server : '')
;
}
}
- return getCatalogPackageManagerServerOrigin() + '/api/upload';
+ return getCatalogPackageManagerServerOrigin() + '/composer/upload?api_server=' + Utils.getSearchParams(window.location).api_server + '&upload_server=' + Utils.getSearchParams(window.location).upload_server + ( dev_download_server ? '&dev_download_server=' + dev_download_server : '');
+ },
+ headers: {
+ 'Authorization': Auth
},
maxFilesize: 10000000000,
clickable: button,
},
maxFilesize: 10000000000,
clickable: button,