2

How I said in the title I am trying to upload an image with js/jquery but I do not know how to take the image to send it to server (PHP). I have a form with all the information that I want and then with jquery i take all this information to save it in MySql. I tried to get an object with the image attributes but got this error:

I am doing something wrong or maybe I need something else...?

Sorry for my bad English.

enter image description here enter image description here

ToniTJK
  • 181
  • 1
  • 3
  • 11

1 Answers1

1

An easy way to do that is by using the following plugin that allows you to have some upload progressbar as well (in case you boss needs more ui).

An another approach is to read the file's contents as seen in this link, and convert it as base64 as seen in this question's answers.

An another approach is by looking this answer as well.

Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164