Posting a file to AwareIM's exposed REST endpoint

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Platinum_ar
Posts: 92
Joined: Thu Jan 10, 2013 10:50 pm

Posting a file to AwareIM's exposed REST endpoint

Post by Platinum_ar »

Is it possible to post a file to the AwareIM REST endpoint that expects a set of different attributes like strings, and a file/document/attachment?
Is there any way in general to transfer binary data? Maybe to a dedicated endpoint that is implemented with a process that requires BO with a file attribute only?
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by himanshu »

It is doable with some external plugin. PM me more details what you want to achieve.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by aware_support »

It is possible even without a plugin. Aware IM REST does support binary data.
Aware IM Support Team
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by himanshu »

Now that’s something new to me... I might missed the class... can you share the document or link for reference?
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by aware_support »

This should be explained at the end of the tutorial about consuming REST services.
Aware IM Support Team
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by himanshu »

ok I think it is not supported when we exposed REST API and that's what I was saying.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Posting a file to AwareIM's exposed REST endpoint

Post by BobK »

The following, from

Code: Select all

https://www.awareim.com/forum/viewtopic.php?f=1&t=11766&p=54462
might be useful:
From Bobk
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?
From aware_support
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..................
Bob
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Posting a file to AwareIM's exposed REST endpoint

Post by himanshu »

Thanks Bob,

It is going to be useful but this would not work when data is pushed as multi-form-part.

Still good to know at least there is a way.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Post Reply