Skip to main content
16-Pearl
Aug 12, 2024 8:29 PM UTC
Solved

Can we make print button widget to download in particular folder.

Can we make print button to download in particular folder instead of downloading in downloads folder?

TonyZhangAnswer
Support
Sep 3, 2024 5:25 AM UTC

Hi @AP_10343008 ,

If you want to save file to thingworx repository, you need to let users input "repository name", "path" and "file name" in Mashup, and under the hood trigger a custom service that executes functions like below that takes the user input to save file to specified destination.

 

Things["<RepositoryName>"].SaveBinary({
 path: undefined /* STRING */,
 content: undefined /* BLOB */
});

 

If you want users to download to local PC and specify target folder, users need to change the settings in browser as mentioned by Velkumar

8 replies

19-Tanzanite
Aug 13, 2024 5:26 AM UTC

Hi @AP_10343008 

 

You can change download folder option in browser 

Velkumar_0-1723526759274.png

 

I don't think you can control it in widget level.

 

/VR

 

Translate
16-Pearl
Aug 26, 2024 5:23 PM UTC

That is common for every operation. 
I want to store file in repository when user clicked thingworx button widget, Apart from this activity, user can decide folder location for other browser related downloads. I want both to be two different locations independently.

 

 

 

Translate
TonyZhangCommunity ManagerAnswer
Support
Sep 3, 2024 5:25 AM UTC

Hi @AP_10343008 ,

If you want to save file to thingworx repository, you need to let users input "repository name", "path" and "file name" in Mashup, and under the hood trigger a custom service that executes functions like below that takes the user input to save file to specified destination.

 

Things["<RepositoryName>"].SaveBinary({
 path: undefined /* STRING */,
 content: undefined /* BLOB */
});

 

If you want users to download to local PC and specify target folder, users need to change the settings in browser as mentioned by Velkumar

Translate