Posts

Post not yet marked as solved
2 Replies
1.3k Views
Hi We are using angularjs in our application and using input type="file" for uploading a document in the user's profile.The issu is that if the time difference between choosing the file and uploading the file is more than 30 seconds (roughly), then the file details are lost and it is consequesntly stored as an empty document in the database.directive('fileModelApply', ['$parse', function ($parse) { return { restrict: 'A', link : function (scope, element, attrs) { var model = $parse(attrs.fileModelApply); var modelSetter = model.assign; element.bind('change', function () { scope.$apply(function () { modelSetter(scope, element[0].files[0]); }); }); } }; }])We are using the given directive for the part where user chooses the file.Please let us know if there i any way we can resolve this problem.
Posted Last updated
.