Closed FlyingFlo86 closed 7 years ago
1st trial:
Problem: console says "Upload success", but process.php is not even executed, and I don't know why
'croppedCanvas = $image.cropper('getCroppedCanvas', { width: 320, height: 320, }); croppedCanvas.toBlob(function (blob) { var form_data = new FormData(); form_data.append('croppedCanvas', blob); $.ajax('process.php', { type: "POST", data : form_data, contentType: false, cache: false, processData:false, mimeType:"multipart/form-data" }).done(function(res) { console.log('Upload success'); }); });'
2nd trial:
Problem: upload doesn't work
'croppedCanvas = $image.cropper('getCroppedCanvas', { width: 320, height: 320, }); croppedCanvas.toBlob(function (blob) { var form_data = new FormData(); form_data.append('croppedCanvas', blob); $.ajax('\uploads', { type: "POST", data : form_data, contentType: false, cache: false, processData:false, mimeType:"multipart/form-data" }).done(function(res) { console.log('Upload success'); }); });'
Hi, I want to upload a cropped image to the file server.
1st trial:
Problem: console says "Upload success", but process.php is not even executed, and I don't know why
2nd trial:
Problem: upload doesn't work