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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Create a service which initiates a download of a CSV file to your Local (Not To Server)

nikkolasep
12-Amethyst

Create a service which initiates a download of a CSV file to your Local (Not To Server)

Is it possible to create a service, which initiates download to my local directory?

So far I see only an option to write a service to download/write CSV file to server as below:

 

let params = {
path: "anyPath" /* STRING */,
data: anyInfotable /* INFOTABLE */,
fileRepository: "SystemRepository" /* THINGNAME */,
withHeader: true /* BOOLEAN */
};

Resources["CSVParserFunctions"].WriteCSVFile(params);
ACCEPTED SOLUTION

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

When you run GetFileListingWithLinks on a repository, you'll get a link that can be used to download the file.

But you must make sure to execute the link client side (ie in a mashup)

I believe a 'link' widget should be able to do this for you.

View solution in original post

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

When you run GetFileListingWithLinks on a repository, you'll get a link that can be used to download the file.

But you must make sure to execute the link client side (ie in a mashup)

I believe a 'link' widget should be able to do this for you.

where can I find the service GetFileListingwithLinks? I can't find it either in Snippets or in Me/Entities

nikkolasep_0-1649414319144.png

 

GuillaumeL
13-Aquamarine
(To:nikkolasep)

Hello,

 

You will find it on a repository thing:

// result: INFOTABLE dataShape: "FileSystemFileWithLinks"
let result = Things["SystemRepository"].GetFileListingWithLinks({
	path: undefined /* STRING */,
	nameMask: undefined /* STRING */
});

 

Announcements


Top Tags