PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WEBDEV 2024
→
FileDisplay
FileDisplay
Started by vicheka, Jul., 17 2009 10:14 AM - 1 reply
Connect yourself…
vicheka
#1
Posted on July, 17 2009 - 10:14 AM
Dear all,
In webdev in order to generate a download dialogue box => I have to write code like this:
FileDisplay
(
CompleteDir
(
fWebDir
(
)
) +
"PDF\"
+
"mode_fact_seine_et marne.pdf"
,
"application/pdf"
,
"mode_fact_seine_et marne.pdf"
)
Even though it could generate the download dialogue box but It requires to have full path of the file pdf and that pdf file has to be located in the server with in the site. However, if that pdf file is located in another server => This function FileDisplay are not usefull anymore because I have try to put like this:
FileDisplay
(
"http:\\192.168.100.1\"
+
"PDF\"
+
"mode_fact_seine_et marne.pdf"
,
"application/pdf"
,
"mode_fact_seine_et marne.pdf"
)
=> It could not generate the download dialogue box but instead generate ERROR:
What could I do? => Please anyone help me please
I am hopeless...
Thanks
Best Regards,
Vicheka
Report
0
0
Hilario PEREZ CORONA
#2
Posted on August, 15 2009 - 9:41 AM
The problem is that you cannot send the file to a client that is on another server.
You have two options here...
1. Download the file from the other server using HTTPRequest, and then send it using StringDisplay... Or download it with HTTPRequest, save it with fSaveText, then use FileDisplay to send the file to the client... I won't recommend this because it would consume extra bandwith and if the file is big, a LOT of memory.
2. Open the file address using browser code: BrowserOpen("http:\\192.168.100.1\" + "PDF\" + "mode_fact_seine_et marne.pdf")
This last option will open a new browser so the user can download the file.
Report
0
0
→ Go back to WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text