Open Bug 1690037 Opened 3 years ago Updated 11 months ago

Provide a download API on onContextMenu

Categories

(GeckoView :: General, enhancement, P2)

Unspecified
All
enhancement

Tracking

(Not tracked)

People

(Reporter: amejia, Unassigned)

References

Details

(Whiteboard: [geckoview:m97][geckoview:m98])

We are experiencing multiple issues downloading from contextual menus, as we don't have the same API as we do on onExternalResponse there we have a WebResponse that we use to perform the downloads, without it we have to perform the download our self using GeckoWebExecutor as a result in some cases downloads from contextual menus failed.

Related issue Fenix issue

@arturo other than images, what context menus are you wanting to see downloads appearing on?

Flags: needinfo?(amejiamarmol)

It would be great if we could have this API for any type of file that could be downloaded like videos, audios any other types.

Flags: needinfo?(amejiamarmol)
Severity: -- → S3
Priority: -- → P2
Whiteboard: [geckoview:m88]

Hello @Agi Sferro, you previously closed a bug #1691055 and I am the one who opened it up on GitHub and the issue is labeled #17711 and @Arturo told me I could ask on Bugzilla regarding any updates and it's been 5 days since any new updates were given regarding this issue.

• I am currently using the Beta version of Firefox on my Android phone running Android 10 Q.
Here is my browser information:
86.0.0-beta.5 (Build #2015793427)
AC: 72.0.13, 3419f144a
GV: 86.0-20210212222924
AS: 67.2.0

@Agi Sferro I would like to know what the following information means that you listed above in your last comment.
Severity: -- → S3
Priority: -- → P2
Whiteboard: [geckoview:m88]

1.) Has this issue been reproduced again? Because it still occurs on the latest beta build # 86.0.0-beta.5 (Build #2015793427).
2.) Is it not going to be fixed until GV version #88? (From what I'm understanding from the specific information you listed above)
3.) Lastly when will geckoview:m88 be released for Beta testing or even a Nightly Build?

• Thank you and I'm looking forward to a reply from someone with new information hopefully.

Flags: needinfo?(agi)

This is being proposed to be worked on GeckoView 88, we might not start working on it until later though.

Flags: needinfo?(agi)
Whiteboard: [geckoview:m88] → [geckoview:m89]
Whiteboard: [geckoview:m89] → [geckoview:m91]

Hello @Emily and @Agi
I created an issue over 3 months ago on GitHub regarding this issue for Firefox on Android and it has been over 2 months since I have been given a status update or response from anyone from the Dev team or support team. Also over 29 days since @Emily has updated this specific issue.

1.) I would like to know why that this issue has been pushed back several times now from [geckoview:m88] and all the way now back to [geckoview:m91]?

If the worry is that by fixing this issue would enable users to download videos from YouTube.com, then all you have to do is forbid any downloads of any kind from that specific domain (YouTube.com), and In return so that your application doesn't get pulled from the Google Play store.

This feature used to work in the previous versions of Firefox earlier in 2020 before the big extension overhaul and has been broken ever since.

I'd please ask that this would be moved up for higher priority and for more consideration because downloading videos on any website on the internet is broken with any build of the Firefox Browser on Android.

Thank you for your time and consideration I hope to hear back from someone soon regarding this matter.

Flags: needinfo?(etoop)
Flags: needinfo?(etoop)
Priority: P2 → P1
Rank: 9

Needs to be broken into smaller bugs for each component: audio, video, images etc.

Whiteboard: [geckoview:m91] → [geckoview:m91][geckoview:m92]
Whiteboard: [geckoview:m91][geckoview:m92] → [geckoview:m91][geckoview:m92][geckoview:m93]
Rank: 9 → 2
Whiteboard: [geckoview:m91][geckoview:m92][geckoview:m93] → [geckoview:m91][geckoview:m92][geckoview:m93][geckoview:m95?]
Priority: P1 → P2
Assignee: nobody → jonalmeida942

I spoke with Agi, and there is an interesting direction we can take this. I'm going to focus on just images for now, and expand/file new issues for other elements as I learn more:

  1. Get a result from the selected menu option in the context menu here, so we can know how to perform given actions.
    • We need to provide a list of options available to the app for users to select and we receive the selected one.
  2. Figure out how desktop is getting the image and do the same.
    • How do we get the image out from gecko to provide it as a stream? (this saveMedia function in desktop looks like what we figure out.)
    • How can we re-use what desktop has in their child actor? We should aim to re-use more than duplicate code.
  3. Return the image to the ContentDelegate.onExternalResponse callback, so that existing functionality can handle the image through a regular "download" flow.
    • We should add some checks to remove the save menus if there is no content delegate attached.
    • How do we create a WebResponse with the image so we provide it to the delegate?
  4. Consider how our changes to the context menu can aid future work for custom actions (via Web Extensions) or future work like media context menus.
Priority: P2 → P1
Whiteboard: [geckoview:m91][geckoview:m92][geckoview:m93][geckoview:m95?] → [geckoview:m97]
Whiteboard: [geckoview:m97] → [geckoview:m97][geckoview:m98]
Whiteboard: [geckoview:m97][geckoview:m98] → [geckoview:m97][geckoview:m98][geckoview:m99]
Whiteboard: [geckoview:m97][geckoview:m98][geckoview:m99] → [geckoview:m97][geckoview:m98]

Unassigned for now since I'm not actively working on it.

Assignee: jonalmeida942 → nobody

P3

Nice to have for Fenix

Priority: P1 → P3

(In reply to Chris Peterson [:cpeterson] from comment #9)

This is a huge problem for Fenix, not just nice to save. Fenix downloading is totally broken. I do not understand why you bumped down the priority, [:cpeterson].

This does not just affect Pixiv. As I wrote on GitHub:

The data for the image is already in the browser's memory. Why is another request even being sent? For some images and some websites that might cause you to get a totally different image, what if the end point is programmed to return a random image?

So why not just take the image that's in memory and save it... If that can't be done that's the real API problem. Imagine that a user has an image open in their browser and then the server goes down, and that image turns out to be important... Again they can't save it.

So this isn't just a Pixiv issue, it's an issue in the entire way you have conceived of downloading by right click in the mobile browser.

There are so many bugs that can be caused by doing it the way it's done right now in Fenix…even security related ones if webmasters catch on and tamper with downloaded files only when downloaded by this known bad browser…please fix it.

Rank: 2 → 333

Tasks and enhancements should have severity N/A.

Severity: S3 → N/A
Blocks: 1812797
Webcompat Priority: --- → ?
Webcompat Priority: ? → ---
Rank: 333
Flags: needinfo?(cpeterson)
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.