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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

File Transfer Without SDK

tekktonic
6-Contributor

File Transfer Without SDK

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 4
SteveWorx
6-Contributor
(To:tekktonic)

I am also interested to know this.

tekktonic
6-Contributor
(To:tekktonic)

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.

tekktonic
6-Contributor
(To:tekktonic)

Any word on this?

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.

Top Tags