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 'v1.1'
[osm/UI.git]
/
skyquake
/
plugins
/
composer
/
api
/
composer.js
diff --git
a/skyquake/plugins/composer/api/composer.js
b/skyquake/plugins/composer/api/composer.js
index
801873a
..
d83311f
100644
(file)
--- a/
skyquake/plugins/composer/api/composer.js
+++ b/
skyquake/plugins/composer/api/composer.js
@@
-427,7
+427,12
@@
Composer.addFile = function(req) {
if (!download_host) {
download_host = api_server + ':' + utils.getPortForProtocol(req.protocol);
}
if (!download_host) {
download_host = api_server + ':' + utils.getPortForProtocol(req.protocol);
}
-
+ var input = {
+ 'external-url': download_host + '/composer/upload/' + req.query['package_id'] + '/' + req.file.filename,
+ 'package-type': package_type,
+ 'package-id': package_id,
+ 'package-path': package_path + '/' + req.file.filename
+ }
return new Promise(function(resolve, reject) {
Promise.all([
rp({
return new Promise(function(resolve, reject) {
Promise.all([
rp({
@@
-441,12
+446,7
@@
Composer.addFile = function(req) {
resolveWithFullResponse: true,
json: true,
body: {
resolveWithFullResponse: true,
json: true,
body: {
- input: {
- 'external-url': download_host + '/composer/upload/' + req.query['package_id'] + '/' + req.file.filename,
- 'package-type': package_type,
- 'package-id': package_id,
- 'package-path': package_path + '/' + req.file.filename
- }
+ input: input
}
})
]).then(function(result) {
}
})
]).then(function(result) {