Investigate how to expose an API to notify when I file was uploaded
Categories
(GeckoView :: General, task)
Tracking
(Not tracked)
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
Comment 1•1 year ago
|
||
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.
Description
•