chrome.downloads.onDeterminingFilename is not being called



  • Unlike Chrome and Opera, chrome.downloads.onDeterminingFilename is not being called so we cannot detect the exact file name that is about to be downloaded and cannot download files with specific file names using the chrome.downloads.download function (in Chrome and Opera we use the suggest callback to set the correct file name as the filename option passed to the download function does nothing).



  • @dr_lior said in chrome.downloads.onDeterminingFilename is not being called:

    nothing

    Hi,

    I'm using Vivaldi v1.15.1147.42 but still having the same issue, the "onDeterminingFilename" event is not firing.
    Just tried a very simple extension which puts torrent files to a separated directory and it is working properly in latest Chrome (v66.0.3359.181) but not in Vivaldi.

    var torrentFolder = "!TorrentFiles";
    
    chrome.downloads.onDeterminingFilename.addListener(function(downloadItem, suggest) {
        if(isTorrent(downloadItem)) suggest({filename: torrentFolder + "/" + downloadItem.filename});
        else suggest();
      }
    );
    
    function isTorrent(downloadItem){
    		
      if(downloadItem.mime === "application/x-bittorrent") return true;
      else if (downloadItem.filename.match(/\.torrent$/i)) return true;
      else return false;
    }
    

    I would like to ask is there any plan to fixing it?

    Thanks,
    TuzeszSzarkany



  • @tuzeszszarkany Have you reported the bug. Things can't be fixed, if no one mentions them.

    It's interesting. I thought I was too dumb to implement a similar function in an extension – turns out it could be a Vivaldi problem…



  • @luetage Yes, bug report submitted (VB-40452).


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.