Click here to Skip to main content
15,886,094 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm building a web application, in wich i have an ExtJS (4.1) GridPanel, from wich i'm willing to export data as an XML (meant to be open with Excel), this procedure should be server side, so the server will send a link to the client. And this is my problem. I don't know how to write my WebService, so it send the link to the Client.

Any help please ?
Posted

Using JavaScript and a WebService you aren't going to be able to save a byte array to the file system. What you should do is create a generic download page that accepts a *unique 1 time key* (maybe a GUID) that points to the file to download on the query string. Then from your client side page call your webservice to generate the file and have that return the key for the download. Then you can either dynamically an iFrame to your page and set the location to the download page or you can just set the location of the current page to the download page and the user will get prompted to save the file.
 
Share this answer
 
Your answer seem logic to me, I'm working on a solution that I found out, if it doesn't work I will take a look at your solution. Thanks for the quick answer !
Best regards !
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900