Skip to main content
12-Amethyst
July 19, 2023
Solved

Is there a way to download a file from "ThingWorxFoundation\ThingworxStorage\repository" location?

  • July 19, 2023
  • 2 replies
  • 2501 views

I have a ThingWorx snippet -Resources["InfotableExporterFunctions"].ExportInfotableAsPdf(params); which is creating a pdf file in the "ThingWorxFoundation\ThingworxStorage\repository" location, but I need that file to be created in my local machine not in the ThingWorx repository.

1. Is there a way to create a file in my local machine ?

2. Or does ThingWorx has a feature to download the created file to my local machine?

Please suggest with your sample code. Thank you

 

Best answer by Constantine

You made a typo — it should be “FileRepositories” instead of “repository”.

2 replies

22-Sapphire I
July 19, 2023

Place your file into a FileRepository Thing and it will support downloadable links

18-Opal
July 20, 2023

You can download the generated file via a link like this: http://localhost:8080/Thingworx/FileRepositories/SystemRepository/myfile.pdf

12-Amethyst
July 21, 2023

Please see the screenshot, unable to download via link.

18-Opal
July 21, 2023

You made a typo — it should be “FileRepositories” instead of “repository”.