encode the filename

This commit is contained in:
Girish Ramakrishnan
2019-03-04 11:54:41 -08:00
parent b2c8a4d8ef
commit b0684ce29c
+1 -1
View File
@@ -1586,7 +1586,7 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}
};
post('/api/v1/apps/' + appId + '/upload?file=/tmp/' + file.name, fd, config, function (error, data, status) {
post('/api/v1/apps/' + appId + '/upload?file=' + encodeURIComponent('/tmp/' + file.name), fd, config, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));