Skip to main content
16-Pearl
August 6, 2025
Solved

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

  • August 6, 2025
  • 2 replies
  • 1187 views

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,

Best answer by Constantine

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.

2 replies

18-Opal
August 6, 2025

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.

MA873117416-PearlAuthor
16-Pearl
August 6, 2025

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

 

18-Opal
August 6, 2025

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.

Community Moderator
August 13, 2025

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.