I have code that crops a image when a user clicks on a button:
$('#crop').click(function () {
var imageDataBase64 = $('#image-cropper').cropit('export');
var image = new Image();
image.src = imageDataBase64;
console.log(image);
});
The picture should be uploaded as a coverpicture for the user.
How should I save this picture? Should I store the base64-code in the database? Or Is there any way to transform the base64 to an image and then store It on disk and then store only the reference to the image in the database?
EDIT:
I found the following solution: C# Base64 String to JPEG Image