Hello, I've encountered some issues while using chrome.downloads.download and chrome.downloads.onDeterminingFilename.
I've found that even when I explicitly specify a filename (e.g., "test.jpg") in the chrome.downloads.download function, within the chrome.downloads.onDeterminingFilename event, the filename I retrieve from the downloadItem still reflects the original name from the download link, not "test.jpg".
This implies that if I use chrome.downloads.download with a specified filename in my Chrome extension, and if any other extension installed by the user use the chrome.downloads.onDeterminingFilename listener—regardless of whether it's intentional or not—the ultimate downloaded filename will not match my intended one.
And if I also use chrome.downloads.onDeterminingFilename within my Chrome extension and employ suggest to replace the filename with one that aligns with my expectations, issues may still arise. Firstly, I cannot ensure that my suggest function has the highest priority (as stated, "If more than one extension overrides the filename, the last installed extension whose listener passes a suggestion object to suggest prevails."). Secondly, how can I use chrome.downloads.onDeterminingFilename without disrupting other Chrome extensions that are also utilizing chrome.downloads.download?
Is this feature reasonable? And how can I solve this problem?
Would be very happy to get answers