Image file upload to ti.exoste portal


#1

Hi friends,

I am trying to upload one image file which is store in serial flash of cc3200 to ti.exosite cloud ,I am able to upload the content of image to dataport of exosite portal.

But the problem is wherever " +" symbol is present in the contain of image at cloud side the “+” symbol is converted into space(" ") So because of this I could not see the uploaded image.

example:

Board is sending data: “abc+cde+fgh”

Data uploaded to cloud is: “abc cde fgh”

If anyone can solve this issue please let me know.

Regards,

Arvind.


#2

Hi Arvind,

I think the HTTP API write endpoint expects values to be URL encoded. You should be able to fix this by replacing the ‘+’ character with “%2B”.

Give it a shot:

curl http://m2.exosite.com/onep:v1/stack/alias -H 'X-Exosite-CIK: <yourCIK>' -H 'Accept: application/x-www-form-urlencoded; charset=utf-8' -d '<YourAlias>=abc%2def%2Bghi'

Let me know if that works out for you,
-Martin


#3

Hi Martin,

Thank you for reply.

Regards,
Arvind.


#4

It is working fine.Thank you Martin.


#5

For anyone else trying to do this, there is an example Portals custom widget that shows the code to display an encoded image with a test python script to simulate a device sending the data and how it should be formatted:


#6

Thank you MikeA for your suggestion.