ngImgCrop icon indicating copy to clipboard operation
ngImgCrop copied to clipboard

How to get the cropped file?

Open sulthan-ti opened this issue 8 years ago • 4 comments

I have implemented this module in my application. Now my problem is that, how to get the newly generated file to pass to saving controller?

sulthan-ti avatar Jun 16 '16 06:06 sulthan-ti

Just use the extended version since it is in active development: https://github.com/CrackerakiUA/ngImgCropFullExtended/

albertonaperijr avatar Jun 16 '16 06:06 albertonaperijr

I got the base64 file, now I need to convert this base 64 in to a file, then only I can send it to node server and upload it .How to make a file from this base 64 data. If i send thid base64 data, there are two problems: 1)There may be chance of lossing some content of the data (base 64 data is too long) 2)some node servers dont support this much long data plz help me to solve the issue

sulthan-ti avatar Jun 16 '16 12:06 sulthan-ti

How are you getting the base64 data am getting the data in following block

<div><img ng-src="{{myCroppedImage}}" /></div>

but in controller its showing myCroppedImage value empty

hwtech avatar Sep 11 '16 21:09 hwtech

@hwtech i had the same problem. I had to dot in a not well way:

$scope.myCroppedImage2 = $('#myCroppedImage').attr('src');

Get Src with JQuery and assign it in another scope variable. :( Its Ugly but i did not know why $scope.myCroppedImage is zero lenght string

juliobriceno avatar Sep 19 '16 00:09 juliobriceno