Closed Bug 1920171 Opened 1 year ago Closed 1 year ago

Investigate how to expose an API to notify when I file was uploaded

Categories

(GeckoView :: General, task)

All
Android
task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: amejia, Unassigned)

References

Details

We had to disabled FileUploadsDirCleanerMiddleware, which was removing recently files from the temporal directory, when they were try to be uploaded, as soon as users changed their URL, unfortunately that broke some websites use cases see bug 1898524 and bug 1905486, for clean up we still have components.core.fileUploadsDirCleaner.cleanUploadsDirectory() which clear temporal files under /uploads, but this only happens when the app get started, that could cause users having a load of space used by idle files, we need to do further research to find possible alternatives and exposing an API from GeckoView could be one of them.

More context can be found here https://github.com/mozilla-mobile/firefox-android/pull/5029

We spoke offline about bug 1898524 and found a solution that doesn't involve a new API. From our investigation, there isn't any real notification that Gecko can send us to notify when an upload is complete to know when to clear the uploads directory.

The idea to use an "unload" notification works well still, but we required to do some testing to figure out what the equivalent of that would be with the events we have today. We can always optimize this if we get more concrete unload events in the future for other use cases.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.