File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ export default {
8787 // TODO(akinsey): if ($scope.onDone) { $scope.onDone({data: url}); }
8888 if (props .purpose === ' avatar' || props .purpose === ' logo' || props .purpose === ' favicon' ) {
8989 v .model = url
90- emit (' upload-success' , ' http://localhost:8080' + url)
90+
91+ let imageRoot = image .policy .storageType === ' local' ? window .images_local_root : ' '
92+ emit (' upload-success' , imageRoot + url)
9193 }
9294 else v .images .push (image)
9395 })
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ export const upload = image => {
6363 xhr . upload . addEventListener ( 'error' , deferred . reject , false )
6464
6565 // Send the file
66- xhr . open ( 'POST' , 'http://localhost:8080' + url , true )
66+ let imageRoot = storageType === 'local' ? window . images_local_root : ''
67+ xhr . open ( 'POST' , imageRoot + url , true )
6768 if ( storageType === 'local' ) {
6869 xhr . setRequestHeader ( 'Authorization' , 'Bearer ' + token )
6970 }
You can’t perform that action at this time.
0 commit comments