Force download of URL

Chris Young chris.young at unsatisfactorysoftware.co.uk
Tue Dec 30 22:34:17 GMT 2008


Is there any way to programmatically force a download of a URL?

I can view a URL by calling browser_window_go() but this will only
start a download if it is of an unknown MIME type.

Tracing through the code, it loks like the only entry point to
downloading involves holding the shift key and physically clicking on
the link - which then calls an internal function (maybe making this
accessible to platform code is all that is needed?)

I'd like to add a "save link" option to my context menu, and I've just
had a request in for a SAVEURL ARexx command - which would need
something like browser_window_download(url,filename_to_be_passed_back_
to_the_download_functions)

Chris



More information about the netsurf-dev mailing list