This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Uploading image  RSS feed

 
Mohamad Ibrahim
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using json to submit form from web and mobile , i want to add uploading image feature to this form. Any one has an idea how can i do that with code if possible?
 
Tapas Chand
Ranch Hand
Posts: 614
9
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohamad
You can try to convert the image to Base64 string at client side and then pass the data to server in Json.
 
Kumaravadivel Subramani
Ranch Hand
Posts: 171
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check this below link for reference. But this example is of Angularjs.
http://stackoverflow.com/questions/28023703/multipart-form-upload-image-and-json

Please try to do it yourself and if you stuck with that, we will help you. Asking code for your requirement is not a best way to use this forum and you cannot learn in a meaningful way.
 
MohamedAhmed Ibrahim
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both.
Which Base64?
And i'm using java couldn't understand the example plus i'm trying to upload image through web service.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!