How to move the file from local directory to Thingworx repository folder using service.
There is the FileUpload Widget, also potentially REST API post and the Thingworx Agent you can explore for this.
Instead of file upload widget and RestApi is there any code or snippets available.
I do not have any, sorry.
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.
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.
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
It was a big code. actually, can't even find where the function is available.
If the previous response provided a solution for you, please mark it as the Accepted Solution for the benefit of others in the community.
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.