Skybound Software is looking to hire experienced C# developers to work on Stylizer and other forthcoming Skybound products. Click here for details.
GeckoFX is an open-source component which makes it easy to embed Mozilla Gecko (Firefox) into any .NET Windows Forms application. Written in clean, fully commented C#, GeckoFX is the perfect replacement for the default Internet Explorer-based WebBrowser control. Download GeckoFX @ Google Code >
GeckoFX is made by Skybound Software, authors of Stylizer—the professional CSS editor with a strong focus on visual control, error-free workflow, and productivity. Learn About Stylizer >
Discuss GeckoFX, the Open-Source Gecko Control for .NET
You are not logged in.
Pages: 1
GeckoFX 1.8.1.4 display error when download file, so how to download file?
How to "catch" the download event - that provide the file information (Response.ContentCharset, Response.ContentLength ...) before actually download it ? ( Not in the Navigated event) - to write my own download function ? I can check the URL string like : "http://live.com/a.zip" to download file, but what about URL like this : "http://live.com/download.php?file_id=2" that link to a file ?
Thank you for you advise.
Offline
I would like to know this aswell.
Offline
You need to modify the source to catch this event.
on line 1598 in the nsIWebProgressListener.OnStateChange method, add this code:
if ((aStateFlags & nsIWebProgressListenerConstants.STATE_TRANSFERRING) != 0)
{
GeckoResponse rsp = new GeckoResponse(aRequest);
if (rsp.ContentType == "application/x-executable")
{
// do something
}
}There's also some information at http://developer.mozilla.org/en/docs/XU … ad_dialogs about implementing download dialogs but I haven't actually tried it.
Offline
Wow, thank you for you tips, I wish that this feature will be implement in next version :)
Offline
Hi,
I actually use your fantastic GeckoFX and i always get an error message when i try to download a file (whatever the type).
"C:DOCUME~1userLOCALS~1tempfile.zip could not be saved, because the source file could not be read.
Try again later or contact the server administrator"
Can someone help me please ?
(I hope my english is comprehensible)
Thx for your answers !
Offline
drezaem wrote:
Hi,
I actually use your fantastic GeckoFX and i always get an error message when i try to download a file (whatever the type).
"C:DOCUME~1userLOCALS~1tempfile.zip could not be saved, because the source file could not be read.
Try again later or contact the server administrator"
Can someone help me please ?
(I hope my english is comprehensible)
Thx for your answers !
I too get this error.
Offline
The download manager is not working yet.
Offline
I just fixed the download manager. Downloads will be working in the next release.
Offline
Hi,
Thx for your GREAT job !
Waiting for th next release ;)
Offline
Hi Andrew,
Can you tell me when you think the next release wil be available ?
If it's possible, can you post the code added for the downloads ?
Thank you for your answer.
Offline
I'll try and get it posted within the next few days.
Offline
Which file do you post the code into to, is it GeckoWebbrowser.cs?
Offline
Skybound_Andrew wrote:
You need to modify the source to catch this event.
on line 1598 in the nsIWebProgressListener.OnStateChange method, add this code:Code:
if ((aStateFlags & nsIWebProgressListenerConstants.STATE_TRANSFERRING) != 0) { GeckoResponse rsp = new GeckoResponse(aRequest); if (rsp.ContentType == "application/x-executable") { // do something } }There's also some information at http://developer.mozilla.org/en/docs/XU … ad_dialogs about implementing download dialogs but I haven't actually tried it.
Do you put this in Geckowebrowser.cs ?
Offline
I still cant get downloads to work...
Can anyone help?????
Using xulrunner 1.9.0.4 VB.net 2008 and copied accross GeckoFX chrome files.
Offline
I've got the exact same problem as cheesekun. I think.
Downloads work perfectly when the location url contains the file extension, but not when the file type is determined by content-type.
Anybody found a solution?
Offline
Pages: 1