Skip to main content
1-Visitor
July 25, 2019
Question

Unable to download file from TWX-remoteRepository to edge-device with C-SDK using twFileManager_Get

  • July 25, 2019
  • 1 reply
  • 2564 views

Hi,
In our customer release, we need to download a file from Thingworx remote Repository to the system where C-SDK edge server is running.

We are trying the same with get file api in the below format, but its giving some errors and we are not able to achieve this.

twFileManager_GetFile("SystemRepository", "/", "test.txt", pConfigparam->m_ThingName, "twx", "\\test.txt", 0, TRUE, &tid);

1) we have tried transferring from SDK to TWX repository, that works with below format.
twFileManager_GetFile(pConfigparam->m_ThingName, "twx","test.txt", "SystemRepository", "\\", "test.txt", 60, TRUE, &tid);
2) When transferring from systemrepo (Thingworx) ,we get errors using the twFileManager_GetFile api.

Please suggest us how we can achieve this, provide us the steps/samples to do the same.

1 reply

22-Sapphire I
July 25, 2019

Could you invoke the copy command from the platform side to do the transfer?

ajain11-VisitorAuthor
1-Visitor
July 26, 2019

@PaiChung Thanks for your reply.

 

I have tried with copy service also with the same params which i am using in the getfile TW-Cdsk api.

The copy service is able to download the file to the target directory successfully, but i am facing the  issue  with the file size --i.e.

1) if the file size is < 2-3 mb i am able to download it successfully.

2) if the file size  is greater than that in our case its 18+ mb, then its showing error.  The errors are different.  

a) sometimes it is saying thingname is not connected after some some minutes of calling the service may be(2-3 minutes) , however the edge server is always connected.

b) sometimes i am getting ThingworxApi timeout issues after some minutes of calling the service.

 

Please help us out how we can resolve these issues.

Also we want to know how we can achieve this with the C-SDK itself, i can share the related logs as well.

 

Regards,

 

Ayush

22-Sapphire I
July 26, 2019

The Filetransfer subsystem in the Thingworx platform has some configuration, perhaps check those?