i want to pass cropped image to controller table images with path cuolmn to store images this is my code
path.src = canvas.toDataURL();
canvas.toBlob(function (blob) {
var formData = new FormData();
var myFile = blobToFile(blob, 'avatar.png');
// console.log(myFile);
formData.append("path",myFile.name);
$.ajax({
method: 'post',
data:{"path":formData } ,
processData: false,
contentType: false,
});
});
function blobToFile(blob, path){
//blob.lastModifiedDate = new Date();
blob.name = path;
return blob;
}
console.log(path);
this my controller
public function store(Request $request)
{
$image = $request->all();}
it returns only token in using cropper and laravel 5.6
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire