cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Is It Possible to Write Files to a Network File Share (UNC Path) with Credentials from ThingWorx?

MA8731174
16-Pearl

Is It Possible to Write Files to a Network File Share (UNC Path) with Credentials from ThingWorx?

Hello everyone,

   I was wondering about a use case where I need to save image files (in base64 format) from ThingWorx to a network file share path of our company like this:

 

 
\\amae.test-universe.com\dummy\USER\testinglink\5000-project\claim
 

Currently, I do this manually using a Python script running locally on my PC, where I'm already authenticated to the network. It works well because my Windows session has access to the share.

Now, I’d like to automate this entirely through ThingWorx — ideally by calling a service and saving the file directly to that network path. I know about FileRepository and FileTransferSubsystem, but I understand that ThingWorx cannot directly supply a username and password for UNC paths.

So my questions are:

  1. Is it possible to write to a network share that requires authentication directly from ThingWorx? 

  2. Has anyone implemented a similar use case, and if yes, what approach worked best?

Any input, advice, or examples would be greatly appreciated.

Best regards,

ACCEPTED SOLUTION

Accepted Solutions

There are several ways to achieve it:

 

  1. Map that UNC path as a drive to your server, then create a symbolic link to /ThingworxStorage/repositories/claims
  2. Run Tomcat Windows service under a user which is "already authenticated to the network"
  3. Configure FileRepositoryRoot in platform-settings.json

(3) is probably the best place to start.


Vilia (my company) | GitHub | LinkedIn

View solution in original post

4 REPLIES 4

There are several ways to achieve it:

 

  1. Map that UNC path as a drive to your server, then create a symbolic link to /ThingworxStorage/repositories/claims
  2. Run Tomcat Windows service under a user which is "already authenticated to the network"
  3. Configure FileRepositoryRoot in platform-settings.json

(3) is probably the best place to start.


Vilia (my company) | GitHub | LinkedIn

I would like to clear that this is just for one of our customer who wants the pictures to be stored automatically when he sends the request with picture to thingworx and not globally needed feature. Its just for one customer (customer is internal so there is no security issue in organization) and he does not want to do it manually from phython script and this is why i would like to do in thingworx.

 

also about saving picture in fileshare there are several folders and that i need to choose in the fileshare link that in which folder i need to place the picture and that parameter i would also get from front end that in which folder this picture belongs

 

Now about third point which you have mentioned that it is the best way to achieve this task, i would start from it. as you can see screenshot below also for the platform-settings.json so in this fileRepositoryRoot now should i write it as object for eg

 

"FileRepositoryRoot": {
"claimsRepo": "\\\\aema.universe-world.com\\test\\USER\\...\\claim"
}
 but it can create an issue if i remove /ThingworxStorage

 

 

MA8731174_0-1754483460354.png

 

Yeah, that would apply to all repos in the system. If you only want to do this for one of them, you should probably go the symlink route.


Vilia (my company) | GitHub | LinkedIn

Hello @MA8731174,

 

It looks like you have some responses from a community member. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Announcements


Top Tags