Skip to main content
Mar 24, 2021 7:49 AM UTC
Question

Need service for moving file from local directory to Thingworx Repository

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

9 replies

Mar 24, 2021 7:20 PM UTC

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

Mar 25, 2021 3:13 AM UTC

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

Mar 25, 2021 1:02 PM UTC

I do not have any, sorry.

Mar 25, 2021 6:40 PM UTC

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

Mar 26, 2021 3:39 AM UTC

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.

Mar 26, 2021 8:22 AM UTC

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

Apr 11, 2021 5:23 AM UTC

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

Apr 9, 2021 7:28 PM UTC

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

May 4, 2021 3:12 PM UTC

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