Skip to main content
12-Amethyst
Jul 19, 2023 12:16 PM UTC
Solved

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

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

 

18-Opal
Jul 21, 2023 5:08 AM UTC

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

5 replies

22-Sapphire I
Jul 19, 2023 2:01 PM UTC

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

Translate
18-Opal
Jul 20, 2023 2:22 PM UTC

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

Translate
12-Amethyst
Jul 21, 2023 4:56 AM UTC

Please see the screenshot, unable to download via link.

Translate
18-Opal
Jul 21, 2023 5:08 AM UTC

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

Translate