Bug 83444 - [browser] file download control and progress events
Summary: [browser] file download control and progress events
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 128119 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-21 14:47 EST by Christophe Cornu CLA
Modified: 2018-05-03 13:23 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Cornu CLA 2005-01-21 14:47:23 EST
Request for ability to 
- intercept and prevent downloads
- programmatically set download location if permitted
Comment 1 Christophe Cornu CLA 2005-01-21 15:22:45 EST
Status:

1. Download is supported on Windows (IE). It works on Mozilla but it currently 
relies on unfrozen API and is therefore fragile. Download needs to be 
implemented on the Mac.

Mac: TBD Need to look into WebKit API webView decidePolicyForMimeType and for 
code like:
     if ([WebView canShowMIMEType:type])
        [listener use];
    else
        [listener download];

Then look into download: decideDestinationWithSuggestedFilename API



2. - intercept and prevent downloads

Current API supports filtering of URL loading.
See org.eclipse.swt.browser.LocationListener.changing notification. It can be 
used to filter URLs to be navigated to - including documents the native 
Browser has no registered viewer for and will attempt to download. 
Notification contains a doit flag to cancel the loading.

e.g when the user clicks on the HTTP Eclipse download page for the eclipse 
build, he/she receives a LocationListener.changing notification:
http://fullmoon.ottawa.ibm.com/downloads/drops/R-3.0-200406251208/eclipse-SDK-
3.0-win32.zip
Setting the event doit flag to false will block the download.
Location target cannot be currently set programmatically.

3. - programmatically set download location if permitted

Note for Windows. Need to investigate FileDownload and IDownladManager API.

Note for Mozilla. We are currently implementing unfrozen API nsIDownload 
nsIProgressDialog nsIWebProgressListener nsIHelperAppLauncherDialog to provide 
a download dialog when embedding Mozilla. As a result the download scenario is 
fragile on that platform. We should not add API that rely on these unfrozen 
interfaces. We need to get these APIs - or new API - frozen in future version 
of Mozilla to support this use case.
Comment 2 Christophe Cornu CLA 2005-01-21 15:27:46 EST
See Mozilla request at:
https://bugzilla.mozilla.org/show_bug.cgi?id=252627
Comment 3 Grant Gayed CLA 2005-08-23 15:32:03 EDT
*** Bug 101750 has been marked as a duplicate of this bug. ***
Comment 4 Grant Gayed CLA 2007-02-28 16:02:16 EST
*** Bug 128119 has been marked as a duplicate of this bug. ***
Comment 5 Grant Gayed CLA 2007-02-28 16:03:18 EST
Bug 128119 suggests progress events as well.
Comment 6 Eric Zimmerman CLA 2007-02-28 20:17:02 EST
How do you figure that progress events bug 128119 is a duplicate of this?

Intercept and prevent downloads.....programatically set download location????

That seems a far stretch.

I just wanted progress events for downloading...no control over anything!
Comment 7 Grant Gayed CLA 2007-03-01 09:33:50 EST
They're not the same, but from the implementation perspective these functions likely live together in the native browsers and would be exposed in a common machanism (eg.- a download listener).

I've updated the title to ensure that the progress events part is not lost in the comments.
Comment 8 Christoph Laeubrich CLA 2018-05-03 13:23:37 EDT
Is there any progress on this?