'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
+ 'package-path': package_path ? package_path + '/' + req.file.filename : req.file.filename
- }
+ };
+
+ var uri = utils.projectContextUrl(req, utils.confdPort(api_server) + '/api/operations/package-file-add');
+
+ input = utils.addProjectContextToRPCPayload(req, uri, input);
+
-
+ var assetType = req.query['asset_type'].toUpperCase();
+ input[makeAssetTypeParamName(package_type)] = assetType;
return new Promise(function(resolve, reject) {
Promise.all([
rp({