Open Bug 1911990 Opened 9 months ago Updated 24 days ago

[Downloads v2] Prevent redownloading of same file if that's already been downloaded once

Categories

(Firefox for Android :: Downloads, enhancement, P2)

All
Android
enhancement

Tracking

()

People

(Reporter: rsainani, Unassigned)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group4])

Currently, fenix downloads the same file as many times as the user tries even if the same file has been downloaded previously. Fenix should give an option to the user to open the file in addition to the usual options of "download" and "cancel". The idea is to save data and resources as the file is already present and accessible on disk.

Technical Notes:
This can be achieved by checking the etag header. If the same etag header for the same url resource is returned, that means the file hasn't changed, and we can give user the option to open the existing file. The user can still choose to re-download the file.

This would require saving the etag header of the file being downloaded in the downloads database so it can be checked when the same download resource url is used.

In the header, there is an etag unique id for a downloaded file. We can store it and check if the file with this existing etag has been downloaded before.

Whiteboard: [fxdroid][group4]
Duplicate of this bug: 1921985

Users from bug 1921985 complain about duplicate files being overridden and suggest prompting to either overwrite or rename files, as well as a default behavior modifiable in settings.

Blocks: 1948708
No longer blocks: 1904019
Summary: Prevent redownloading of same file if that's already been downloaded once → [Prevent redownloading of same file if that's already been downloaded once
Summary: [Prevent redownloading of same file if that's already been downloaded once → [Downloads v2] Prevent redownloading of same file if that's already been downloaded once
Depends on: 1957985
Depends on: 1957987
You need to log in before you can comment on or make changes to this bug.