Home/Support/Support Forum/How to call connector api to upload binary file?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to call connector api to upload binary file?

0 votes
I have a jpg file ( size < 1M bytes). I want call connector API to upload it to iDigi. Anyone help me?


Thanks.
asked Sep 27, 2012 in Cloud Connector for Embedded by szwax888 New to the Community (2 points)

Please log in or register to answer this question.

4 Answers

0 votes
I'm assuming you're talking about the iDigi Connector for Embedded (instead of the Connector for Android for instance).

Take a look at the send_data sample included with the connector download. It shows how to send data to iDigi.

Also, if you open up the user's guide (in the docs folder of the connector download), you can see more information by clicking on the Data Service menu on the left under API Details.
answered Sep 27, 2012 by cpopp Seasoned Professional (151 points)
0 votes
I know what you say. In fact, we have uploaded the text data by the connector. The problem is when I upload a jpg file (binary), it always fail. It may be caused by other reasons. But I am not sure if the SDK support the binary uploading.
answered Sep 28, 2012 by szwax888 New to the Community (2 points)
0 votes
Quote:
I know what you say. In fact, we have uploaded the text data by the connector. The problem is when I upload a jpg file (binary), it always fail. It may be caused by other reasons. But I am not sure if the SDK support the binary uploading.

How does it fail?
answered Feb 20, 2013 by DrASK New to the Community (2 points)
0 votes
Or try this.
Read jpg file using normal open system call and read content to a buffer (send_data sample)
Create a file in iDigi and create appropriate file with filename, say pic.jpg and upload this data buffer to this file.

helps?
answered Feb 26, 2013 by tuxembb Veteran of the Digi Community (288 points)
...