Tarball the config and give it to the front end

Download file as blob to avoid binary string encoding
This commit is contained in:
Sam Chow 2018-06-25 17:40:59 -04:00
parent 7619ab44e5
commit aa93d698b2
8 changed files with 66 additions and 1677 deletions

View file

@ -212,12 +212,20 @@ angular.module('quay-config').factory('ApiService', ['Restangular', '$q', 'UtilS
var urlPath = path['x-path'];
// Add the operation itself.
apiService[operationName] = function(opt_options, opt_parameters, opt_background, opt_forceget) {
apiService[operationName] = function(opt_options, opt_parameters, opt_background, opt_forceget, opt_blobresp) {
var one = Restangular.one(buildUrl(urlPath, opt_parameters));
if (opt_background) {
one.withHttpConfig({
'ignoreLoadingBar': true
});
if (opt_background || opt_blobresp) {
let httpConfig = {};
if (opt_background) {
httpConfig['ignoreLoadingBar'] = true;
}
if (opt_blobresp) {
httpConfig['responseType'] = 'blob';
}
one.withHttpConfig(httpConfig);
}
var opObj = one[opt_forceget ? 'get' : 'custom' + method.toUpperCase()](opt_options);