Hi,
I have uploaded one file
currently my requirement is that after clicking of submit button if filesize is greater than 5mb need to display alert validation message
could you please help me
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Index</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/danialfarid-angular-file-upload/12.2.13/ng-file-upload.min.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', ['ngFileUpload'])
app.controller('MyController', function ($scope, $http) {
$scope.SelectedFiles = [];
$scope.UploadFiles = function (files) {
if (files.length > 0) {
$scope.SelectedFile = files;
$scope.SelectedFiles.push(files);
}
};
$scope.Save = function () {
}
});
</script>
</head>
<body>
<div ng-app="MyApp" ng-controller="MyController">
Upload File:<input type="file" ngf-select="UploadFiles($files)" />
<div style="padding: 10px 0;">
<input id="submit" type="button" value="Save" name="add" ng-click="Save()" class="btn btn-success" />
</div>
</div>
</body>
</html>