You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(document).ready(function(){var$uploadCrop;functionreadFile(input){if(input.files&&input.files[0]){varreader=newFileReader();reader.onload=function(e){$('.upload-demo').addClass('ready');$uploadCrop.croppie('bind',{url: e.target.result}).then(function(){console.log('jQuery bind complete');});}reader.readAsDataURL(input.files[0]);}else{console.log("Sorry - you're browser doesn't support the FileReader API");}}$uploadCrop=$('#upload-demo').croppie({viewport: {width: 200,height: 200,//type: 'circle'},enableExif: true});$('#upload').on('change',function(){readFile(this);});$('.upload-result').on('click',function(ev){$uploadCrop.croppie('result',{type: 'canvas',size: 'viewport'}).then(function(resp){// in this hidden input we can send cropped image to server$('#userprofile-avatar').val(resp);$('#cropped-result img').attr('src',resp);});});});