PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → Problem with generate download dialogue to download pdf file
Problem with generate download dialogue to download pdf file
Iniciado por ouk.chanvicheka, 01,may. 2009 21:33 - 1 respuesta
Publicado el 01,mayo 2009 - 21:33
Dear everybody,
I have a problem with this please help:
First, I develop on webdev and now i create a button to read the pdf file and another button to download pdf file and for the button read pdf file it is now ok but for button to make a download Dialogue for user to download the pdf still not ok yet and in order to do this i found that in webdev already have the function to do this:
FileDisplay(...); however, it needs the complete exact path. For example,
FileDisplay(CompleteDir(fWebDir()) + "install_reel.pdf", "application/unknown","install_reel.pdf")

yes this code is ok it can generate a download dialogue but you know for my case for the path to download the pdf is taken from database and the path looks like this: "http://192.168.100.3/Tech/Guide.pdf" (not real just an example) and thus i try test this case as following line:
FileDisplay("http://192.168.100.3/Tech/Guide.pdf", "application/unknown","install_reel.pdf")

But it is not working and gives the error as following:
Impossible d'ouvrir le fichier <C:\AKOS_TP_WEBSITE\Exe\http:\192.168.100.3\akostp\pdf\install_reel.pdf>.

Do you have any ideas please give me? Please help....

Best Regards,
Vicheka
Publicado el 02,mayo 2009 - 17:52
Hi Vicheka,

As far as I know, for security reasons, a web site cannot access
anything on the server except it's own directory and subdirectories...
If you NEED to access something else, as seem to be the case, you'll
need your server configured differently (read rights on the directories
you need, by example)

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on http://www.fabriceharari.com


vicheka wrote:
Dear everybody,
I have a problem with this please help:
First, I develop on webdev and now i create a button to read the pdf file and another button to download pdf file and for the button read pdf file it is now ok but for button to make a download Dialogue for user to download the pdf still not ok yet and in order to do this i found that in webdev already have the function to do this:
FileDisplay(...); however, it needs the complete exact path. For example,
FileDisplay(CompleteDir(fWebDir()) + "install_reel.pdf", "application/unknown","install_reel.pdf")

yes this code is ok it can generate a download dialogue but you know for my case for the path to download the pdf is taken from database and the path looks like this: "http://192.168.100.3/Tech/Guide.pdf" (not real just an example) and thus i try test this case as following line:
FileDisplay("http://192.168.100.3/Tech/Guide.pdf", "application/unknown","install_reel.pdf")

But it is not working and gives the error as following:
Impossible d'ouvrir le fichier <C:\AKOS_TP_WEBSITE\Exe\http:\192.168.100.3\akostp\pdf\install_reel.pdf>.

Do you have any ideas please give me? Please help....

Best Regards,
Vicheka