Skip to content

Commit

Permalink
fix image upload - code regresssion
Browse files Browse the repository at this point in the history
  • Loading branch information
dularion committed Apr 16, 2019
1 parent 7e8b8c6 commit c54dcb8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ angular.module('streama').controller('settingsSettingsCtrl',
//check if upload dir is set
apiService.settings.list().then(function (response) {
var data = response.data;
var uploadDir = _.find(setlist, {settingsKey: 'Upload Directory'});
var uploadDir = _.find(data, {settingsKey: 'Upload Directory'});
if (uploadDir.value) {
//do upload
uploadService.doUpload($scope.uploadStatus, 'file/upload.json?isPublic=true', function (data) {
Expand All @@ -86,11 +86,10 @@ angular.module('streama').controller('settingsSettingsCtrl',
if (assetURL.startsWith("upload:")) {

var id = assetURL.split(":")[1];
apiService.file.getURL(id)
.success(function (data) {
setting.src = data.url
apiService.file.getURL(id).then(function (response) {
setting.src = response.data.url;
return true;
})
});

} else {
setting.src = assetURL;
Expand Down

0 comments on commit c54dcb8

Please sign in to comment.