I've been attempting to utilize AngularJS for uploading multiple files, but for some reason, the values are not being stored in the model filestore.
HTML Code:
<div ng-app="myApp">
<div ng-repeat="file in filelist">
<label>{{file.name}} </label>
<input type="file" ng-model="filestore[$index]" />
</div>
</div>
<div>
<input type="button" value="submit" ng-click="savefiles(filestore)"/>
</div>
JavaScript:
myApp.controller('uploadCtrl', function ($scope,$http) {
//List of file names
$scope.filelist = ["file1", "file2", "file3"];
//Save file list
$scope.savefilelist = function(filestore) {
$http({
method: 'POST',
url: '/api/SaveFiles',
data: filestore
});
};
})