Hi friends, I want to download a file from LPC2366 based embedded webserver;
So I have Implemented the RAM file system. I am able to read and write to the file R: test.txt.
Now I want to download this file to Client PC.
For the file download, I have modified the HTTP DEMO project under==> keil/ARM/boards/keil/MCB2300/RL/TCPNET/HTTP_demo. I have added the RAM file system code. I am able to read /write the file R:test.txt
For downloading the file, I am using AD button event on the home page( index.htm)....
. .......... . ......... . ........ <center> <table width="797" height="94" border="0" cellpadding="0" cellspacing="0"><tr><td align="center"> <font face="Verdana"> [ <a href="/network.cgi">Network</a> | <a href="/system.cgi">System</a> | <a href="/leds.cgi">LED</a> | <a href="/lcd.cgi">LCD</a> | <a href="/dwnld.cgi">AD</a> | <a href="/language.cgi">Language</a> | <a href="/tcp.cgi">Statistics</a> ]</font> </td></tr></table>
So that, when i click on AD button, it will call dwnld.cgi ( given bellow)
t <HTML> t <head> t <META http-equiv=Content-Type content="application/download"> t <META http-equiv=Content-disposition content=": attachment; filename=R:test.txt"> t </head> t </HTML> . END of the script
Now the problem is, on button click event i am getting a balnk page in the IE.
Is there some thing missing in the download script.
Please suggest!!
Buttons? "<a href="/dwnld.cgi">AD</a>" does not represent any AD button. The href gives the target address of a link, not a button.
"Is there some thing missing in the download script."
Just a question: Where is the script? Your print of the dwnld.cgi just represents html data to send. But what part of the text represents a script, i.e. code to be executed? Does the Keil manual document file downloads? Note that a common way to download files when you use href links is to let the link represent the address of the link and then let the user right-click the link and do Save-as (or as alternative just click the link and have the MIME + web browser decide if the data can be viewed or requires a question to the user what to do with the file).
But to send out a file, something must take responsibility for serving the file, i.e. sending the file data.
I haven't used the Keil embedded web server, but have they documented that the web server will read the meta tags and figure out that a file should be served?
Actually, i dont know HTML. some terms used in my last post might be confusing.
the situation is, I have a RAM file system and Web server implemented on the LPC2366. " Web server" is same as boards/keil/MCB2300/RL/HTTP_demo
In the HTTP_demo project out of Network,LCd,AD (Button / link)on the home page...I want to modify / add the code to use AD for my file download....
Please help if any one have done the File download to client machin from Embedded Web server.