Search Posts

Category: ng-file-upload

ng-file-upload each values in data are converting to arrays in server side

trying to upload service, here’s my upload function looks like $scope.upload = function(){ Upload.upload({ url: /upload_url/, method:’POST’, data: {file: $scope.file, ‘message’: “test”} }).then(function (response) { }, function (response) { if (response.status > 0) $scope.errorMsg = response.status + ‘: ‘ + response.data; }, function (evt) { $scope.progress = parseInt(100.0 * evt.loaded / evt.total); }); } and file input element looks like <input type=”file” ngf-select=”” ng-model=”file” name=”file” ngf-accept=”‘image/*'” data-classbutton=”btn btn-default”data-classinput=”form-control inline” class=”filestyle form-control”> but in serverside I […]