erickutcher / httpdownloader

HTTP(S) download manager that uses input/output completion ports (IOCP).
https://erickutcher.github.io/#HTTP_Downloader
571 stars 62 forks source link

Extension: Add "Folder Picker" button to Firefox Extension's Add URL Popup #243

Open Wassss opened 1 year ago

Wassss commented 1 year ago

Please Add "Folder Picker" button to Firefox Extension's Add URL Popup :

picker

Like main app popup :

picker2

erickutcher commented 1 year ago

As far as I know, the showDirectoryPicker() API doesn't allow the retrieval of a full path. The way around this would be to enable "Override browser's download manager" in the extension's options, and in Firefox's settings, enable "Always ask you where to save files".

The extension will use the path that the Save As... dialog uses. If you also enable "Show Add URL(s) window before download" in the extension's options, you'll be able to see the path that gets set and also tweak any of the advanced options.

Wassss commented 1 year ago

Hi @erickutcher and thank you.

As far as I know, the showDirectoryPicker() API doesn't allow the retrieval of a full path. The way around this would be to enable "Override browser's download manager" in the extension's options, and in Firefox's settings, enable "Always ask you where to save files".

The extension will use the path that the Save As... dialog uses. If you also enable "Show Add URL(s) window before download" in the extension's options, you'll be able to see the path that gets set and also tweak any of the advanced options.

Thats what i am using until now. But what i am trying to ovoid is : that firefox auto start downloading in background to my OS drive while i am choosing where to save the file (then stop when Extension's Add URL Popup appear). This is the default behavior of firefox and i cant change it.

The solution is to right click the link and choose "Download link..." option. Thats why i asked you to add a folder picker button to the extension's Add URL popup.

I understand there is API limitation.

Wassss commented 1 year ago

Does these links help? https://stackoverflow.com/a/77132443 https://github.com/ichaoX/ext-file

erickutcher commented 1 year ago

That first link has the API that's needed, but it's still not possible for it to retrieve the full path. The second link uses the same API, but that extension also has a helper app that runs locally and scans the system for the full path based on the relative path.

There's no clean way to do it unfortunately. One other option is to set the default download directory in the Site Manager. If you're downloading files from a particular website and want to have those downloads in a specific directory, then the Site Manager can do that.