0

Is it possible to store an image and some column fields in mysql database using only AJAX without action attribute in form tag? I am using contentType as JSON in AJAX to pass my column fields.

Is there any solution to send the image in the JSON format. Kindly provide the solution.

Ramana
  • 31
  • 1
  • 7
  • 1
    You can look at [base64](https://en.wikipedia.org/wiki/Base64), to store images as a text in DB or send them inside JSON (here is an [answer](https://stackoverflow.com/a/13109632/8554766) addressing, how to do it in Java). Though, if you would share some more details of what exactly you are trying to accomplish and why - it is possible that you better off doing it in some other way. –  Nov 23 '17 at 07:56
  • It would also be nice, if you'd share some things you have tried already. –  Nov 23 '17 at 08:02
  • @Filipp Thank you ,will upload the program contents and will share the link. – Ramana Nov 23 '17 at 14:04
  • @Flipp Please find the link for program written to store images using mysql https://stackoverflow.com/questions/47457975/image-storing-in-mysql-database-with-spring-mvc-and-hibernate-using-ajax – Ramana Nov 23 '17 at 14:42

0 Answers0