Is there a way to use ngFileUpload to read the contents of a csv file before saving it to a database?
$scope.checkAndUploadFile = function (file) {
$scope.uploadFileProgress = true;
Upload.upload({
method: 'POST',
url: 'api/contacts/contacts-upload/',
data: {"upload": file, 'website': $scope.websiteId}
}).then(function (resp) {
$scope.uploadFileProgress = false;
$scope.uploadFileSuccess = true;
}, function (resp) {
console.log('Error status: ' + resp.status);
}, function (evt) {
});
};