cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Posting Images into the repository via REST call

tcoufal
12-Amethyst

Posting Images into the repository via REST call

Hi Guys,

I am maybe too quick with the question, but Ill ask anyway.

How can I upload images (or any other file) into the TW repository (default or otherwise since TW7.0) directly through the REST API calls.

Thanks a lot.

Tomas

1 ACCEPTED SOLUTION

Accepted Solutions

Hi

It's possible but takes some effort, you have to base64 encode the file and then include the encoded string as content.

Try the SaveBinary service of a repository Thing to test this out.

Hope this helps

Regards

Ian

View solution in original post

3 REPLIES 3

Hi

It's possible but takes some effort, you have to base64 encode the file and then include the encoded string as content.

Try the SaveBinary service of a repository Thing to test this out.

Hope this helps

Regards

Ian

tcoufal
12-Amethyst
(To:ibanham)

Hi

so I am on a good track afterall

I am reverseengineering the service mashup from tw (repository) via Wireshark and it calls imageEncoder first and than relay the encoded message to repository message.

I will test that service. Thanks.

tcoufal
12-Amethyst
(To:tcoufal)

Yep, we got that going.

Now we are sending photos from mobile devices seamlessly to ThingWorx repository.

And now with TW 7.0 and higher we can choose what ever repository we want (remote disks, SMB, FTP what ever) I am thrilled.

Top Tags