diff --git a/www/js/directives.js b/www/js/directives.js index 9b2350b4517582bbaa434056ce710ef5487fa0f2..e207a9262476cf31b7af36f58f8e8f45f5f91ff6 100644 --- a/www/js/directives.js +++ b/www/js/directives.js @@ -464,6 +464,10 @@ angular.module('cesium.directives', []) fileContent: onLoadEvent.target.result, fileData : fileData} }); + + // Reset the input file + fileInput[0].value = ''; + }); }; reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]); diff --git a/www/plugins/es/js/controllers/common-controllers.js b/www/plugins/es/js/controllers/common-controllers.js index 3f2e0e4973b438fa440d541b4d63acc6569569d7..b2aa4ef14ab9f0df442e2e7e024e97e27c6c78c0 100644 --- a/www/plugins/es/js/controllers/common-controllers.js +++ b/www/plugins/es/js/controllers/common-controllers.js @@ -461,6 +461,10 @@ function ESAvatarModalController($scope, $sce) { $scope.doPrevious = function() { $scope.formData.imageCropStep -= 1; + // Reset the image + if ($scope.formData.imageCropStep === 1) { + $scope.formData.imgSrc = undefined; + } }; $scope.doCrop = function() {