fixed bug in infoscreen imageupload
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div ng-controller="infoadmin_image_create" style="margin-top:20px;">
|
||||
<div class="form-group">
|
||||
<label>Name:</label>
|
||||
<input type="text" ng-model="item.name"></input>
|
||||
<input type="text" ng-model="imagename"></input>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="file" ngf-select ng-model="img" name="file" required>
|
||||
|
||||
@@ -109,9 +109,10 @@ app.controller('infoadmin_abbitem_create', function($scope, $http,ItemList){
|
||||
|
||||
app.controller('infoadmin_image_create', ['$scope', 'Upload', '$timeout',"ItemList", function ($scope, Upload, $timeout,ItemList) {
|
||||
$scope.send = function(file) {
|
||||
console.log("name: "+$scope.imagename);
|
||||
file.upload = Upload.upload({
|
||||
url: '/infoscreen/create_image',
|
||||
data: {name: $scope.name, image: file},
|
||||
data: {name: $scope.imagename, image: file},
|
||||
}).then(function (response) {
|
||||
$timeout(function () {
|
||||
file.result = response.data;
|
||||
|
||||
Reference in New Issue
Block a user