I made a function to upload and cut preview images, but I first uploaded a picture locally to an iframe, and then cropped it. After cropping, there is a small box on the right to display the crop preview. I want to click " When confirming the "Crop" button, submit the cropped image directly to the server, but I don't know how to submit it~ Just submit the image on the right side of the image to the server
Use a form to submit, and action to the address you want. It is recommended that Baidu html form
input type="image" submit the form and take the image coordinates to the server to take a screenshot
Your main image has been uploaded to the server. When you crop, you only need to submit the rectangular information to the server, and then the server uses the main image for cropping. There is no actual cropping on the browser side. Picture
I found that the picture on the right actually only shows a part of the large picture and has not been cropped, but I am going to upload the picture on the left. The request does not contain a multipart/form-data or multipart/mixed stream , content type header is null This is a servlet, the underlined sentence reports an error.
Use ajax to pass
This is a form
Why does this error occur? ? How to solve it?
Your form is submitted in binary format, so it definitely cannot be uploaded using ordinary $.ajax?
Use jquery.form.js to refresh it?
http://jquery.malsup.com/form/#file-upload