Presentation Screenshots Download Support Development Forum    

Welcome to the Community Forum.

Here you can discuss with other users or with the author, suggest new features, report bugs, ask for filters creation or correction, etc. Select the forum you wish to read or post below :

Forum > Wishlist, Feature request > Possible rework of the Local Folder variable?

Pages : [1] Add a reply
User info Possible rework of the Local Folder variable?
Dec 14 2010, 9:11 am
Man! Great job on the addon so far!

This idea seems relatively straightforward, but may be difficult to recode and implement... anyways, here goes :)

What I'm thinking is this: I want to have the option to define the destination filename right inside the 'Local Folder' variable. (current ASF format seems like it should handle it [with dynamic folders on] - see screenshot 2 - , but the filename is created as folders - the Firefox manual downloader can currently do this, if you were to macro through it) The current 'dynamic folder creation system' elements could then extend to the actual filename potentially allowing for two interesting developments:

1)Custom/Dynamic file naming, dependent on user filters
2)If your ASF steps through the regular ff download procedure, when the regular procedure encounters the same file in this manner, it pauses on a warning that allows the user to confirm file overwrite, rather than the program or add-on auto-selecting what to do in the situation. (file overwrite prompt - see screenshot - ) - Is it somehow possible to extract the data to get the popup? Others have requested this and I'd like to see it also. If others don't want to overwrite previous files, or deal with slightly less automated downloading they can add a date to the filename to mitigate the possibility of the same name, or just not use this new function at all. In any case, each prompt can reduce the amount of duplicate info that gets saves to one's computer.

If the above change is made, some others that would follow include:
- Error handling: maintain the same file extension from source to destination - show file extension as static text just beyond input area.
- Quotes surrounding 'Local Folder' - could determine whether 'file' designation is actually a folder
- Change the 'Local Folder' title to 'Save Location' - 'Folder' is less specific, 'Save location' would better define the input

I have read a couple other posts about the difficulty of Firefox and duplicate file handling, but I thought I'd give my two cents. Hope it can be of some use
Post #1
Dec 14 2010, 11:18 am

I would like to add that feature too, I had that request few times already.
But it's currently working with right-click only, and I don't want to add a feature which is half-available :/
I may ask to a Mozilla developer how I can do it.

To be able to define the saving filename (and a dynamic filename creation too), I need access to the saving function :

ASF right-click filtering is working by intercepting the Firefox right-click function, so I can modify the suggested filename. I already made a testing version, it worked fine.

Unfortunately, the Firefox single-click function use a script which I can't intercept (Or I currently don't know how to do it).
That's why the "What Firefox need to do with this file" menu is needed, I'm running ASF filtering functions there and modify the save path right before the user accept the download.
It's more a hijacking than an interception of code.

The saving process is working like that :

Right-click :
1. Firefox launch -> Right-click function is loaded and stay in memory until Firefox is closed -> fully rewriting of the function to add ASF filtering -> The saving function with ASF stay in memory.
2. Right-click/save as -> ASF filtering is triggered inside the saving function. I have access to the saving variables.

Single-Click :
1. Single-Click on a link -> Firefox launch a script which wasn't in memory. I can't detect when that script is in memory and can't modify its variables -> Firefox read the mime type of the file, defined in tools/options/applications -> check if it's set to "always ask" or "save to...".

If set to "save to...", then it doesn't open the save dialog.
The previous save path is used automatically. If a file already exists with that filename, it is renamed numerically (1), (2), etc.

If set to "always ask", then it opens the save dialog "what should Firefox do ...".
Here, I take the opportunity to run ASF filtering, and modify the saving path.
If a file already exists with that filename, it asks about renaming.


I will rename the 'Local Folder' title to 'Save Location'. You are right, it feels better :p

About the suggesting filename (if/when it will work fine for single-click too), I'll add a 3rd input field to define the filename mask.
- Domain
- Save location
- Filename
Post #2
Edit / Delete
Pages : [1] Add a reply

Return to top