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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

how to download multiple files from filerepo?

asuthrave
1-Visitor

how to download multiple files from filerepo?

We are trying to download multiple pdf files from filerepo. How can we perform this action? Is there any service or resources which we can use?

5 REPLIES 5
paic
12-Amethyst
(To:asuthrave)

When you use GetFileListingWithLinks, it exposes a URL that allows for downloading the file.

Files will have to be downloaded one at a time, although you could package them in a Zip archive and provide them in a single download.

asuthrave
1-Visitor
(To:paic)

We have a function which loops through the files in the filerepo.


See the code below with the line  "How can I download a file here?"

var params = {

nameMask: "",

path:""

};


// result: INFOTABLE dataShape: FileSystemFileWithLinks

var result = Things["myfilerepo"].GetFileListingWithLinks(params);


for each(var myfile in result.rows)

{

  How can I download a file here?

    logger.warn(myfile.downloadLink);


}




paic
12-Amethyst
(To:asuthrave)

You will need to return the download links to a mashup so the user on the client side can click them to initiate the download.

From the server side script you won't be able to initiate a client side download.

asuthrave
1-Visitor
(To:paic)

I am using the downloadlink in the GetFileListingWithLinks(param) and connecting that to Link Widget SourceURL and I was able to download only 1 file but I want to download 1 file at a time if it has multiple files. Is that even possible?

paic
12-Amethyst
(To:asuthrave)

If you display it in a Grid you will see the full list of links you are returning.

Announcements


Top Tags