How to save image on your host


There isn’t nothing complicated, change urlToUploadImage to your own path, and try to upload an image!

Your path must receive a POST request with new FormData() which will have upload parameter. In this upload parameter will be your image for uploading, make all changes in you server and return a JSON format like
{ status_code: 200, data: { img_url: 'full path of your image', thumb_url: 'thumb path for your image' } } in case of success or {status_code: 'whatever ;)', status_txt: 'Uploading problem here!'} in case of some error.

"Cannot POST" error when sending Ajax