Hi, I have been working on LPC2478 with the uvision IDE. Right now I am trying to bring a file on the SD card and open it in the web browser. I already have a function that extracts the required data from the files on SD card and makes plots with those values. Keil provides an example named upload to put a file on user computer on to the SD card. I am looking for the reverse. Please let me know if any one has a clue.
Thanks, Ram.
Thank you for your reply and I am really happy to see this functionality in the latest version of tools. I tried to look into what they did in this version, but I cannot find any difference in HTTP_CGI.c or the cgi pages. I also looked at the MCI files I didnot find any difference. Do u have any idea what they did to do this?
Never mind I think I might have found it. They have a href anchor next to the dir string list...suttle..but makes a hugeee difference..Thank you very much.
sivaram vempati, I'm allso trying to bring file from SD card to the browser with Http_upload, do you open a file put it in a string and then send it, or you use HTTP_uif.c file to do this ? Thank you in advance
You need to go thru HTTP_uif.c, this the user interface for the web browser. You need to add some code to htp_fopen to open files from folders rather than from the root directory.
Cheers, Sivaram.
Thank you for the answer sivaram! Can you give me un example code, so that http_fopen can open files from folders !
Aelx,
Here is the code...I go in there look for a / which signifies there is a folder involved and then replace the path.
Sivaram.
Sivaram,
Isn't \\ the folder sign, and in a function like
f = fopen ((const char*)fname,"r")
how to specify that fname is from a folder
Thanks
Do an sprintf into fname with the folder you want the compiler to go thru...
sprintf((char *)fname,"Panel%d\\d09%02d%02d.csv",plot_month+1,plot_month+1,plot_date+1)
here my folder name is Panel with a subscript of month number.
Then the file names are d09monthdate
Thanks a lot!