PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → WB[23] Browser code
WB[23] Browser code
Débuté par ARV, 29 sep. 2018 18:03 - 3 réponses
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 29 septembre 2018 - 18:03
Hi all

I want to download a file from my server.
I create the file and I know the name of the file from my page on browser but I can't downloaded in my page, (because filedipslay it's not available for browser code)
so I tought to display another page, I do with this:

PageDisplay(PAGE_Test,NewBrowser)


I can't send the name of my file to this Page_test (my page Test I change it to static or semi-dynamic, PHP) and no one I can have the name of my file

I don't know how to pass it or how I can get it.

I need to open another browser and download my file

is it possible?
Thanks

--
Best Regards
ARV
Membre enregistré
17 messages
Popularité : +1 (1 vote)
Posté le 30 septembre 2018 - 10:44
Hi ARV,

FileDisplay IS available in browsercode, it's just that browsercode cannot acces the server's filesystem by path and file.
You need to pass an URL for the file instead of a path.
So just store the file in a place that can be reached via an URL and it can be downloaded directly from browsercode using the URL.

Another technique is to create a new AWP page with a link that downloads the file.
Again, you can use FileDisplay to display this awp page.
Pass the filename as a parameter and in the onload of the page do an ExecuteProcess,trtClick to the link to download the file.

See the Help for FileDisplay in Browsercode.

Kind regards,
Piet
Posté le 30 septembre 2018 - 16:56
Hi

if you want any relevant answer for a webdev question, you need first to
give us some context: classic/intranet, awp/extranet-internet, php, etc...

As for your question, without any context, just use the filedisplay in
the server side code, with a button destination of "new browser"

Best regards

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

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

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


On 9/29/2018 10:03 AM, ARV wrote:
Hi all

I want to download a file from my server.
I create the file and I know the name of the file from my page on
browser but I can't downloaded in my page, (because filedipslay it's not
available for browser code)
so I tought to display another page, I do with this:

PageDisplay(PAGE_Test,NewBrowser)


I can't send the name of my file to this Page_test (my page Test I
change it to static or semi-dynamic, PHP) and no one I can have the name
of my file

I don't know how to pass it or how I can get it.

I need to open another browser and download my file

is it possible?
Thanks

--
Best Regards
ARV
Membre enregistré
498 messages
Popularité : +8 (8 votes)
Posté le 02 octobre 2018 - 21:26
Hi all

Thanks for the replys

In the end I use a AWP page, on my page of windev I open this AWP page with browserOpen then I pass the name of my file as a parameter and then use FileDisplay on the another page.

I was not sure how to give the parameter on a string with browserOpen but I know how to do it.

Thanks!

--
Best Regards
ARV