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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Posting Images into the repository via REST call

tcoufal
13-Aquamarine

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

ACCEPTED SOLUTION

Accepted Solutions
ibanham
12-Amethyst
(To:tcoufal)

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
ibanham
12-Amethyst
(To:tcoufal)

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
13-Aquamarine
(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
13-Aquamarine
(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.

Announcements


Top Tags