I am trying to expose a REST service in my AwareIM application that accepts a picture, but I can not get it to work.
In my testing, I am sending the picture as base64 encoded. The tomcat log file has the following error: "Invalid format of binary representation for attribute myPic"
Is this possible in the latest version of AwareIM (version 8.4 build 2722)?
If so, what format does the picture data need to be in?
is it possible to receive picture in a REST service
-
- Posts: 7526
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: is it possible to receive picture in a REST service
Yes, it is possible. The data for the picture should start with the file name, then a delimiter # and then Base64 encoding of the picture, for example:
myPicture.png#aa2342bb33..................
myPicture.png#aa2342bb33..................
Aware IM Support Team
Re: is it possible to receive picture in a REST service
That’s kind of cool.
Looks like you’re gonna solve that Tuesday Bob.
Take an image of how that data structure looks when you get that embedded please. Or attach the uploaded data. Thx
Looks like you’re gonna solve that Tuesday Bob.
Take an image of how that data structure looks when you get that embedded please. Or attach the uploaded data. Thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: is it possible to receive picture in a REST service
THANK YOU SUPPORT.
Jaymer et al.
This will be used to allow users to load their pictures into the system via a REST service.
Here is a small sample of the JSON coming into the service:
{"userid":"BobK","userpic":"bobk.jpg#iVBORw0KGgoAAAANSUhE..."}
userid is so I know whose picture it is.
userpic is a file name for the picture, "#" and the Base64 encoding of the picture.
Jaymer et al.
This will be used to allow users to load their pictures into the system via a REST service.
Here is a small sample of the JSON coming into the service:
{"userid":"BobK","userpic":"bobk.jpg#iVBORw0KGgoAAAANSUhE..."}
userid is so I know whose picture it is.
userpic is a file name for the picture, "#" and the Base64 encoding of the picture.
Bob
Re: is it possible to receive picture in a REST service
good to know. thx
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL