Skip to main content
1-Visitor
November 6, 2015
Question

Upload file to (REST) Web Service from ThingWorx.

  • November 6, 2015
  • 2 replies
  • 2225 views

I want to upload a file to Web Server hosting Upload web service from ThingWorx, i came across service getXml but i cant use it for uploading. Is there any service available which i can use it to upload file on Web Service hosted on Tomcat Server ?

    2 replies

    1-Visitor
    November 6, 2015

    Try PostXML? Not sure if that server accepts a post of a file

    5-Regular Member
    November 6, 2015

    Create a FileRepository Thing and use the SaveBinary service. You will need to pass the content in a format compatible with Blob, like encoding in base64.

    1-Visitor
    December 8, 2015

    Meghan,

    I have crated the FileRepository Thing and identified the SaveBinary service.

    Do you have an example of the RESTFul URL that accomplishes this? What is its method?  How to append the binary content?

    Assuming something starting with: https://myplatform.thingworx.com/Thingworx/Things/myRepositoryThing/Services/SaveBinary....and now some parms...

    Any suggestions?


    Thanks,