element-desktop
element-desktop copied to clipboard
When saving a file, use unique name if file exists already
Your use case
What would you like to do?
When saving a file and a file already exists with the same name, make the save dialog use a new unique filename.
Why would you like to do it?
Currently when saving images for example some file types are always saved as image.xxx which causes a problem when saving more than one. Each subsequent file has to be manually renamed.
How would you like to achieve it?
With something as simple as: if image.png exists the saving dialog will give the new file the name image1.png...
Have you considered any alternatives?
There are none.
Additional context
No response
We don't control the save dialog, it is the default one from Chromium/Electron
You can not check in your code before the dialog is opened and send the filename into the dialog as a parameter?
We don't open the dialog, it is opened when the Chromium inside Electron signals for a save dialog due to a link being clicked. We could rewire everything to fire these dialogs manually but it'd be a huge refactoring to the matrix-react-sdk and element-web