我正在使用ngFileUpload上传csv文件。有没有办法在将文件保存到db之前读取该文件的内容。
$scope.uploadFile = 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) {
});
};