Hello.
I’m creating an Eshop website and I want the user to upload and crop an image. The problem is that I want to upload the image using ajax and not by submitting a form but getting the local url of the image is forbidden by the browsers (returns fakepath).
So is there a way to send a file though ajax or am i stuck with a form submission?
The reason I want to do that is so the user can see the image immediately after pressing the open button, so he can crop it.
The only solution I figured out until now is this:
user_presses_submit_btn -> image_goes_to_the_server -> server_sends_the_image_back_to_the_user -> user_crops_the_image -> croped_image_sented_and_posted_on_the_server