koorgoo / ngCropper

AngularJS wrapper for https://github.com/fengyuanchen/cropper
107 stars 72 forks source link

cannot upload new images again and again #44

Open azadnio opened 7 years ago

azadnio commented 7 years ago

once uploaded the Image there is now way to upload another image.

ravishan110 commented 6 years ago

i am also facing the same issue.. any solution for this?

Cassie-Yu commented 6 years ago

may seem stupid, but it works for me

$scope.onFile = function(blob){
    if(blob){
        $scope.dataUrl = undefined;
        $timeout(function(){
                Cropper.encode((file = blob)).then(function (dataUrl){
                    $scope.dataUrl = dataUrl;
                    $timeout(showCropper);
                });},100)
    }
};