Merge branch 'master' into projects
authorKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Fri, 5 May 2017 15:37:55 +0000 (11:37 -0400)
committerKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Fri, 5 May 2017 15:37:55 +0000 (11:37 -0400)
1  2 
skyquake/plugins/composer/api/composer.js
skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js
skyquake/plugins/composer/src/src/components/filemanager/FileManagerSource.js
skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx

@@@ -556,14 -540,10 +559,15 @@@ FileManager.addFile = function(req) 
          '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({