NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mike McLoughlin on July 01, 2009, 07:58:33 AM
-
Working on example 40 I have set up an Other button to call ServeDocument with a file name.
The prompt save/run comes up OK but the file option to save to includes the mangled path:
If I pass it '.\web\downloads\yosemite_prayers.wav' it shows this in the save to dialog
._web_downloads_yosemite_prayers.wav
If I don't pass the path with the file it doesn't find the file. So I need a way to take out the '._web_downloads_'
In the example I notice the files are in the exe folder.
regards
Mike
-
no the file doesn't have to be in the exe folder, it can be anywhere on the disk that you allow.
the file served is stored in loc:filename in the ServeDocument procedure.
however the name sent back to the browser is set in the content disposition. ie
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&clip(loc:fileName)&'"'
in the example it uses loc:filename there, but you can use anything, literally anything, you like.
Cheers
Bruce