Skip to main content
1-Visitor
March 24, 2021
Question

Need service for moving file from local directory to Thingworx Repository

  • March 24, 2021
  • 4 replies
  • 2835 views

How to move the file from local directory to Thingworx repository folder using service.

4 replies

22-Sapphire I
March 24, 2021

There is the FileUpload Widget, also potentially REST API post and the Thingworx Agent you can explore for this.

1-Visitor
March 25, 2021

Instead of file upload widget and RestApi is there any code or snippets available.

22-Sapphire I
March 25, 2021

I do not have any, sorry.

Support
March 25, 2021

Hi @SR_9679028.

 

Can you provide more regarding the use case?  Do you expect to have multiple users using it?  Just creating a service might not be the best approach.

 

Regards.

 

--Sharon

1-Visitor
March 26, 2021

Actually, we are trying to import a .csv file using the file upload widget. In that .csv file, there will be a link to the image like (D:\Pictures\image.png). after I imported the.csv file the image specified in the link should be copied to the system repository. This is the process.

17-Peridot
March 26, 2021

I don't have an end-to-end example, but here is how I'd approach the task...

 

There is the Thingworx/FileRepositoryUploader endpoint which, probably can be used. This is the one used by the FileUploader widget, as far as I understand.

You can check the JS code in the \webapps\Thingworx\Runtime\mashup-common-widgets-runtime.js

1-Visitor
April 11, 2021

It was a big code. actually, can't even find where the function is available.

Support
April 9, 2021

Hi @SR_9679028.

 

If the previous response provided a solution for you, please mark it as the Accepted Solution for the benefit of others in the community.

 

Regards.

 

--Sharon

Support
May 4, 2021

Hi @SR_9679028.

 

Have you found a solution to meet your specific needs?  If so, we would be happy for you to share with others in the community.

 

Regards.

 

--Sharon