RE: How to specify a path for file download



Thanks for that - a nice nice lateral approach. It may be the way to go.
Cheers
Bob

"Michiel" wrote:

> Just a thought for a possible work-around; you could capture the URL of the
> file in the BeforeNavigate event and, if the user wants to download it,
> present a dialog and use another way to download the file (e.g. with the
> URLDownloadToFile API).
>
> "BobM" wrote:
>
> > Hi,
> > In IE6, if you try to open say a .mpg link that Media Player refuses to
> > open, IE presents a dialog warning that the file is either corrupted or of
> > an incorrect type, and recommendss that you cancel the download. If you
> > proceed with the download, IE presents a "Save to" dialog, you select where
> > to save the file and proceed. IE then displays the file download progress
> > dialog etc.
> >
> > I am using IWebBrowser2 in my app. I have managed to intercept the initial
> > error (OnNavigateError) that is generated when MP wont play the file. Here I
> > present the user with a warning not to download the file, and set a member
> > bool to signal that the next FileDownload event should cancel if the user
> > cancels in my dialog. That's all fine. But I also want to be able to be able
> > to specify where the file should be downloaded to. At present if the user
> > does not cancel (so my member bool is left unchecked so the FileDownload
> > event is not cancelled, the file download just proceeds without any
> > opportunity to select a path, and the file is saved to the temporary
> > directory. I can present a "Save to" dialog, but I cannot see any interface
> > in IWebBrowser or IDocHostUIHandler to set the user specified path.
> >
> > I think I am missing something here. Can anyone help please.
> > TIA,
> > Bob
> >
> >
.



Relevant Pages

  • Re: File Download not finishing Sub
    ... presses the Cancel button or not. ... Sub GetFileDownload ... trace.warn("At end of Download") ... The problem is that I then want the program to rename the file ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Odd error when closing a window.
    ... Hit the 'dwonload' button then ... yes, the download function is running along downloading something, ... the cancel button, so that event is triggered and deletes the entire window. ... Yes, the cancel does not stop the download and since the download writes to a window (to provide some logging of what is happening, it will indeed continue to write to a non-existence window. ...
    (comp.lang.tcl)
  • Re: Odd error when closing a window.
    ... Closing the Window works fine, but if I hit the download button first, then try to hit Cancel, it generates an error. ...
    (comp.lang.tcl)
  • Re: SP1 install
    ... John Inzer wrote: ... I get the install and the download, when I get to the license ... agreement I see the next box and cancel box. ...
    (microsoft.public.windows.vista.installation_setup)
  • How to specify a path for file download
    ... and recommendss that you cancel the download. ... present the user with a warning not to download the file, ... the file download just proceeds without any ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)