Adrian Mardare wrote:
> Hi...
>
> If I use the nsIWebBrowserPersist interface to save a document into a file,
> how do I get progress notifications?
>
> #include "nsIWebBrowserPersist.h"
>
> nsCOMPtr<nsIWebBrowserPersist> persist = do_QueryInterface(mWebBrowser);
> persist->SaveURI(uri, nsnull /* postdata stream */, "d:\\data\\somefile");
>
> If I use:
> persist->SetProgressListener( somePersistProgress );
>
> the only notification provided is:
> nsIWebBrowserPersistProgress::OnProgress(PRUint32 aStatus, nsIURI *aURI,
>PRBool*aAbort)
> that is called only to indicate the begining and the end of the downloading process.
>If the file is very large, I'd need to display a progress bar with a percentage of
>the download. How can I do this?
>
> Adrian
Currently there is no way to know the percentage complete other than start and stop.
I've expanded a bug I've just opened on the object to also cover this issue:
http://bugzilla.mozilla.org/show_bug.cgi?id=77909
Adam