Hi All,
We'd like to access files in repository folder of ThingA from another things which are in the same project like ThingB.
Can we do that ?
Solved! Go to Solution.
Hi @Yoshihiko.N
This is definitely possible to copy files from one Repository to another. Please refer to this link for more details on how to achieve this use-case.
You can also make use of Copy Service of FileTransferSubsystem which gives an option to select source and target repository.
Do revert back for further query.
Hi @Yoshihiko.N
This is definitely possible to copy files from one Repository to another. Please refer to this link for more details on how to achieve this use-case.
You can also make use of Copy Service of FileTransferSubsystem which gives an option to select source and target repository.
Do revert back for further query.
@suverma
Thank you for your quick response.
I confirmed we can use "copy" service in "FileTransferSubsystem".
and I have one more question.
How can we call the copy service from services in other things ?
if you provide me code example, I'd be happy.
Hi @Yoshihiko.N
You can try something like below in your custom service where Thing A and Thing B can be your source and target repository:
var params = {
async: false /* BOOLEAN */,
sourceRepo: "RepoThing" /* STRING */,
targetRepo: "TargetRepo" /* STRING */,
targetFile: "Openssl command.txt" /* STRING */,
targetPath: "/" /* STRING */,
sourceFile: "Openssl command.txt" /* STRING */,
sourcePath: "/" /* STRING */,
timeout: undefined /* INTEGER */
};
// result: INFOTABLE dataShape: FileTransferJob
var result = Subsystems["FileTransferSubsystem"].Copy(params);
Hi @Yoshihiko.N
If the last shared response has resolved our query, please mark the appropriate response as the Accepted Solution for the benefit of others with the same problem.
Regards,
Sudeepta
Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.