Search Posts

Category: file

Memory Leak while using FileReader

I am using HTML FileReader and readAsDataURL but the memory consumption of my application keeps increasing as I upload new files. I have configured it to accept only one file. Whenever I select new file it doesn’t clear the memory used by old file. What could be the possible way to fix it? Source: AngularJS

How do I upload a file to an ng-repeated model?

I have an angular controller that is supposed to update person data. With text and date fields, that works just fine, I have <ul> <li ng-repeat=”person in $ctrl.persons | filter:$ctrl.query”> … <div ng-show=”person.edit”> <label>Full Name*:</label><input class=”edit-person” ng-model=”person.fullname” /><br /> <label>Birthdate:</label><input class=”edit-person” type=”date” ng-model=”person.birthdate” /><br /> <label>Deathdate:</label><input class=”edit-person” type=”date” ng-model=”person.deathdate” /><br /> <label>Description: </label><input class=”edit-person” type=”text” ng-model=”person.description” /><br /> <img ng-src=”{{person.picture}}” width=”100px” height=”100px” /><br /> <label>Picture: </label><input class=”edit-person” type=”file” accept=”image/*” ng-file-select=”handleEditPersonFiles(this.files);” /><br /> <button ng-click=”$ctrl.submitEdit(person); person.edit […]