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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Create a custom file repository in thingworx

tayyasamy
1-Visitor

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

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.

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

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

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!

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

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.

tkawasaki
15-Moonstone
(To:Duartefe)

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"
		}
	}
}
Duartefe
12-Amethyst
(To:tkawasaki)

Hi,

I am using version 7.3.

 

Thanks!

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.

I will test it and post here soon.

 

Thanks for the replies.

Hi Carles,

 

What you test works for me as well but I need to point the repository to a different drive, in a network to be more specific. Even when TWX creates the folder it is still looking for files in the system repository.

Create is not the problem, the problem is read the files from the new repository.

 

Thanks,

Felipe Duarte

If at the end it's not working as expected better you open a support case.

CRArko
17-Peridot
(To:Duartefe)

Hello, Duatefe.

 

Did the suggestion provided by rosharma help you solve this? If so, could you mark that as an accepted solution to assist others who search about this issue?

 

If not, let us know where you stand currently so we can continue the investigation.

 

Thanks!

 

-- Craig A.

Duartefe
12-Amethyst
(To:CRArko)

Hi Craig,

 

The answer is Yes and No. :)

I could map the the repository to another folder in C:\ where the Thingworx is installed but I would like to use another drive, is this case a shared drive in network and it does not work.

However, in order to help another users that need something basically than I am trying I will mark it as correct.

Is that works for you?

 

Thanks,

Felipe Duarte

i tried providing storage & backupStorage folder location in platform-settings.json file as below

 

"PlatformSettingsConfig": {
"BasicSettings": {
"BackupStorage": "D:/teststorage/ThingworxBackupStorage",
"Storage": "D:/teststorage/ThingworxStorage"
}

 

doing this creates a ThingworxStorage & ThingworxBackupStorage both folders in mentioned location

now moving to composer i created filerepository testthing. exported this file using repository as SystemRepository, files gets exported to D:\teststorage\ThingworxStorage\repository\SystemRepository

that means ThingWorx is reading the mentioned location.

Announcements


Top Tags