I use HTTP-Server compact and I want to make a link to file on uSD memory for user download. Is this possible?[How?]
Thanks.
I'm already connected to uSD memory and have a WebServer too.(without any problem) Web Server files(Image) programmed to flash now and I want to load a file from uSD into this webServer.
Info:
MDK-ARM v5,TCP/IP and RL-Flash custom STM32F107 board.
Ok, so can you decode the HTTP GET requests, and service those with data from a file instead of wherever you're pulling the data from now?
"so can you decode the HTTP GET requests"
Yes.I can manage POST and GET request.
"And service those with data from a file instead of wherever you're pulling the data from now?"
yes.I can read my uSD file.
sorry,I think you get something wrong. User want to do this: Enter some text like this(this example is direct link solution) :
192.168.0.25/.../myFile.zip
and download start.
myFile.zip into uSD and all of WebServer files in the internal Flash of microcontroller. Is there any way that I can connect some path to webServer?
-------------------------------------------------- another solution that I think,make a handler between WebServer and uSD,but I don't know how make it,or Its possible?
May be I'm wrong, or you're explaining it poorly.
If someone typed
into their browser, wouldn't that generate an HTTP GET with a request for "/storage/myFile.zip", which you said you were decoding, right? Can you not parse that and recognize you want to be pulling that file off the SD card? Separate the /storage/ part from the file name and path combination, and handle it from the memory card, or internal storage as appropriate.
Can't you use the C string library functions, or navigate the request string?
Instead of asking if something is possible, I'd recommend reviewing some books on C, and practicing various data and string handling exercises.
The only thing a web server needs to do is make sure that the path represented in the request represents either a limited sandbox directory tree in the local file system, or keep a specific file map list of what files may be serviced - just so that the SD card can be allowed to hold other content too without someone accidentally getting access to the extra files on the card.
Are the files large? Can they be sent out in a single chunk?
Thanks. sorry,you are right.I can't explain well.
" into their browser, wouldn't that generate an HTTP GET with a request for "/storage/myFile.zip", which you said you were decoding, right?
"
Surely.
"Can't you use the C string library functions, or navigate the request string?"
I can work with strings and strings library and have some experience in it. I can't navigate the request to my file.
Its that I need to know(step by step):
*1- How can I access to requested string? 2- I will process the string and there is no problem in this step. *3- How Can I navigate analyzed string to my file?
"Are the files large? Can they be sent out in a single chunk?"
Yes.About 10 MB and always in changing and not fitted to single chunk.
sorry again for bad explanation.
I must tell something,I can't find "complete request string" in MDK-ARM webServer compact library. some functions called by this libray and programmers have to use this callBack functions to analyze POST or GET or complete cgi operations.
You mean, how do you access the Request string; ie, what the client sent to your server?
eg, the HTTP GET with a request for "/storage/myFile.zip"
That should be covered in the server documentation - if not, contact Keil support.
"3- How Can I navigate analyzed string to my file?"
The same way you'd navigate to the file if the request came from any other source!
Does this help: http://www.keil.com/forum/10244/ - specifically Franc Urbanc's Post of 26-Jul-2007 06:38 GMT