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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to download folder of a repository thing on button click in ThingWorx

Aditya1702
14-Alexandrite

How to download folder of a repository thing on button click in ThingWorx

Hello Everyone,

Good Afternoon,

 

I have a folder named "photos" in a ThingWorx repository Thing which keeps on updating as & when new images are added to it.

 

I wan to download this folder "photos" which contains multiple images on click of a button from Mashup.

 

Can anyone help me out with this.

 

Thanks in advance.

 

Regards,

Aditya Gupta.

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:Aditya1702)

Haven't done things within ThingWorx for a while, but there are services that can give you the file list and download links for a file repository

GetFileListingWithLinks, then you'll have to execute each appropriate link.

Not 100% sure how to do the last part, sorry.

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:Aditya1702)

Haven't done things within ThingWorx for a while, but there are services that can give you the file list and download links for a file repository

GetFileListingWithLinks, then you'll have to execute each appropriate link.

Not 100% sure how to do the last part, sorry.

Aditya1702
14-Alexandrite
(To:PaiChung)

Hello,

 

Thank you for your response.

 

The problem with GetFileListingWithLinks service is it provides link for each image which are there inside a folder.

 

Also I tried CreateZipArchive service with which I was able to create a zip folder and then used GetFileListingWithLinks to download the zip but, the problem I am facing is 

 

1. CreateZipArchive service requires inputs(newFileName, path, files), so how to save these inputs as these won't be changing for me. I also tried saveinputset option but after reloading of the ThingWorx the input set is automatically erased.

2. I want to use CreateZipArchive service twice with different sets of inputs, since I want to download two different folders which are present in a repository.

 

Is there any way that I could call two different CreateZipArchive Service continuously with predefined sets of input in ThingWorx.

 

Do you have any idea how should I deal with the above problems.

PaiChung
22-Sapphire I
(To:Aditya1702)

I think links can be triggered with an event in a mashup I think or maybe explore the expressions capabilities.

As far as needing to do things multiple times, again I would recommend looking at what potential event triggers you can use for that.

Worst case might have to be a timer/scheduler

Top Tags