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

Create a custom file repository in thingworx

Highlighted
Newbie

Create a custom file repository in thingworx

Hi,

 

Whenever we create FileRepository thing, it is always creating in /ThingworxStorage/repository. I want to customize this folder location, Please help.

15 REPLIES 15

Re: Create a custom file repository in thingworx

Hello Thangavel Ayyasamy​,

Since version 7.0 Thingworx allows to customize location of your Thingworx Repositories. All you need to do, is to create a folder named ThingworxPlatform in the root of your Tomcat/Thingworx installation (e.g. if your Tomcat is installed in C:\Program Files\..., you should create a folder: C:\ThingworxPlatform and so on).

There you should create a file named platform-settings.json. Inside you can put a various configurations for your Thingworx Platform, also for the File Repository root location. The configuration should be in JSON format. The minimal necessary configuration for your task would be:

{

    "PlatformSettingsConfig": {

          "BasicSettings": {

              "FileRepositoryRoot": "<new_repository_root"

          }

    }

}

For another possible configurations and the general information, please refer to the Help Center: Digital Media Publisher and Thingworx Installation guilde.

Please note, that all necessary read/write permissions needs to be granted to the location specified. Otherwise your Thingworx won't startup properly.

Hope it helps, don't hesitate to ask for further assistance.

Regards,

J.

Re: Create a custom file repository in thingworx

Hi J.,

I did that and it creates a folder repository in the path but Thingworx do not recognize it when running services. Are there any other step after that? It is still looking to ThingworxStorage folder.

 

Thanks!

Felipe Duarte

Re: Create a custom file repository in thingworx

Just to try, if you want to set it out of ThingWorx Storage, you may try with ../../../....... whatever

Re: Create a custom file repository in thingworx

Hi,

 

I tried ...\...\...\...\. I tried ....\\.....\\.....\\.....\\ and I also tried ......\......\.......\......\. None of this works but as I mention the repository folder was created automatically so I do not believe that the problem is in the Json file.

 

Thanks anyway!

Re: Create a custom file repository in thingworx

I did it say the ..\ in order to set the folder out of Storage. Did you restart tomcat after the change?

Re: Create a custom file repository in thingworx

I've successfully done it with ThingWorx 8.1.2 (H2 Persistence Provider version) running on Windows OS.

Which version are you using?

 

All I did was just add below in platform-settings.json.

{
	"PlatformSettingsConfig": {
		"BasicSettings":{
			"FileRepositoryRoot":"C:\\TestStorage"
		}
	}
}

Re: Create a custom file repository in thingworx

Hi,

 

Yes, I restarted tomcat and when I restart it creates the folder "repository" on the path but when running services TWX still looking for the old one on C:\ThingworxStorage.

Re: Create a custom file repository in thingworx

Hi,

I am using version 7.3.

 

Thanks!

Re: Create a custom file repository in thingworx

Hello,

I did had time to test it :) (TW 7.3.11)

 

I did set:

"PlatformSettingsConfig": {
 "BasicSettings": {
   "FileRepositoryRoot": "\\TestRepository"
  }
 },

on a Windows machine and to test it, I did go to SystemRepository thing and I called CreateFolder service (with for instance /test) and it worked properly I did get a full path from the Root System Folder (C:):

 

C:\TestRepository\repository\SystemRepository\test

 

Everything worked as specifications.