Skip to main content
1-Visitor
April 24, 2018
Question

File Transfer Without SDK

  • April 24, 2018
  • 4 replies
  • 1934 views

What is the best way to transfer files between the edge and thingworx if an SDK and websockets aren't available? The FTP extension seems like an obvious solution, however as far as I can tell it only supports FTP, not FTPS, SFTP, or any other protocol which encrypts data in transit. Can the REST API be used to upload files? I don't recall any sections on file transfers in its documentation.

4 replies

1-Visitor
April 25, 2018

I am also interested to know this.

tekktonic1-VisitorAuthor
1-Visitor
April 25, 2018

Having played around a bit with even going through the SDK, it seems that the virtual directory solution does not actually copy or record the files anywhere: in fact, there are no services even provided to read the data from the file, it only tells you that it is there and shuffle it between virtual directories. Does Thingworx not have a built-in mechanism for file transfer off of a device and into permanent storage? Something like a store for log files which must be retained even if the edge device is reset and loses its copies.

tekktonic1-VisitorAuthor
1-Visitor
May 1, 2018

Any word on this?

1-Visitor
May 1, 2018

We've written an edge application that used standard .NET file transfer libraries to pull files from a TWX repository.  We were also  able to implement resume so that the download would pick up where it left off in the case of a transfer interruption.  There is an SFTP extension on the marketplace if you choose to go that route.  And yes, you can use the REST API to upload files to TWX.  There is a SaveBinary service on the Repository ThingTemplate.  You can use this.  Your content needs to be a Base64 encoded string value passed in the content parameter.