It had a simple code that was just:
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="text" name="description" />
<input type="file" name="file" />
<input type="submit" value="Enviar" />
</form>
It sent me a post
with a file
that I used on my server, however it was necessary to treat this image before sending it to the server.
I created the following code:
var Demo = (function() {
function popupResult(result) {
var html;
if (result.html) {
jQuery("#cropped").attr("src", html);
}
if (result.src) {
jQuery("#cropped").attr("src", result.src);
}
}
function demoUpload() {
var $uploadCrop;
function readFile(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
jQuery('.upload-demo').addClass('ready');
$uploadCrop.croppie('bind', {
url: e.target.result
}).then(function() {
console.log('jQuery bind complete');
});
}
reader.readAsDataURL(input.files[0]);
} else {
alert("Sorry - you're browser doesn't support the FileReader API");
}
}
$uploadCrop = jQuery('#upload-demo').croppie({
// url: 'https://httpsimage.com/lock.png',
viewport: {
width: 100,
height: 100,
type: 'circle'
},
enableExif: true
});
jQuery('#upload').on('change', function() {
readFile(this);
});
jQuery('.upload-result').on('click', function(ev) {
$uploadCrop.croppie('result', {
type: 'canvas',
size: 'viewport'
}).then(function(resp) {
popupResult({
src: resp
});
});
});
}
function init() {
demoUpload();
}
return {
init: init
};
})();
Demo.init();
input[type="file"] {
cursor: pointer;
}
button:focus {
outline: 0;
}
.file-btn {
position: relative;
}
.file-btn input[type="file"] {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
.upload-demo .upload-demo-wrap,
.upload-demo .upload-result,
.upload-demo.ready .upload-msg {
display: none;
}
.upload-demo.ready .upload-demo-wrap {
display: block;
}
.upload-demo.ready .upload-result {
display: inline-block;
}
.upload-demo-wrap {
width: 300px;
height: 300px;
margin: 0 auto;
}
.upload-msg {
text-align: center;
padding: 50px;
font-size: 22px;
color: #aaa;
width: 300px;
height: 300px;
margin: 0 auto;
border: 1px solid #aaa;
}
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.4.0/croppie.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"></script><scripttype="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/croppie/2.4.0/croppie.js"></script><formaction="upload.php" method="post" enctype="multipart/form-data">
<!--
<input type="text" name="description" />
<input type="file" name="file" />
-->
<img id="cropped" name="cropped" />
<div class="demo-wrap upload-demo">
<div class="container">
<div class="grid">
<div class="actions">
<a class="btn file-btn">
<span>Selecionar Imagem</span>
<input type="file" id="upload" name="upload" value="Choose a file" accept="image/*" />
</a>
<button class="upload-result">Cortar imagem</button>
</div>
<div class="upload-msg">
Selecione uma imagem para cortar
</div>
<div class="upload-demo-wrap">
<div id="upload-demo"></div>
</div>
</div>
</div>
<input type="submit" value="Enviar" />
</div>
</form>
In the <img id="cropped" name="cropped" />
element I get a base64 of type:
<img id="cropped" name="cropped" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAgAElEQVR4nN19WYxc2XleG5CBwInz5AAKAuQljqDAluxI1owo7jub7I1s9r5wa7LJbrLZ3HeyyeHe7K6qu59zbm13q+puLqMZKYqdBJMFUYAIwUCxIcdRHCHIg5z4YR6kF9tIvjyce84991RR64wopYCL7lq6697znf//v3+9HR2/Io+EkN8KiL0h8EonA2IUAq/0fkCNDwJifDeh9vciYn0/JiYSYiKm1l/G1PpeQu3vJcz5IGH2NxrUNmPfPh1XnB2rVfvTb/p6fqUfhJDfCJmxMSDGfEjMMCDmd0JqIqQmAmIgpCZi30bELP47tRAREzExEXsGYmrJ16L0/ZhaSJiNiJqI+PPvxsyKI2bNN6j9FULIr7/p6/6lfnywsPCpOrW6AmI26l7po7pXQt0rQQATUlMCIkCKmIWAGAjcEkLPQEItJMREREwkzJYgJcxGs+xmQKqApZ+PiPk/Y2axmBo73vRa/NI8APxaROxdIbUXQ2p+2G7xdanRPxNSE6Fn8EX2DDTShRdHrDwX4DR8p+X1iPD/l37vf4yo9TBg5rY3vUZv7BES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Gqhtp+rahYzaRdtjZsUJs3a+6fX92B6hb+8Jqf1dfUBG/rDkrTMFQAKwdgCpwKngqswt9JRBgVo1qmrrdGnKhYxIzu/5bkyt4Te9np/IIyHkt+rEmA59+4/E/eTUmT/tVFy7DO7rUuGSLCiSok6hihU2qYduVNotau+EfxZTC42y868azJldte1Pv+l1/IU8QuL0Rcz5MJOe1qIQNQMqcv+ilKklM0qyFLPqe8lRmylQ7XwylZGpdiZ9/8MGsw9+LDdG/1V7EEJ+PaJmZ0iNpYAY39aBUYFQJUj3eThry1N6dWqW7jvpxfe685sQ848T5hRiZu0lhPz6m16nX4oHr30w+wJiNgJifKQWZrwOGKnW/LzNyRqE82kO3fZoIH3UKLtrie/0/Uqzsl/Uo0oLvx8xaz6k5quIWR/lCujbsD0VEF1C9NRG+rmPYmq/iogxH1P799/09f7KP6q2/enQNbcE1DwZMasQEuMbITU/CKj1vYBa3ws94y8VEP4yItb3Arf0vdAzPkizwIXIM0+Grrml+itk6P8fVmDDkbFZKlUAAAAASUVORK5CYII=">
Now I need to know how to send this image to the base64 pro server and work with it to be in the form of a input
type file