Files
ThreadNet-Web/apps
7711207393 Keep a file's extension when it is renamed in the desktop save dialog (#34601)
Electron's save dialog offers only "All Files" unless it is handed filters,
so someone who replaced "photo.jpg" with "photo" got a file with no extension
at all and no way to open it. The browser does not do this: it offers the
file's own type, and puts the extension back when the name arrives without
one.

The download now names its type before the dialog goes up, and the "Save
image as..." context menu passes the same filters. A file with no extension
to preserve is left alone rather than being given a meaningless filter, and
"All Files" stays on the list so anyone who really wants an extensionless
name can still pick it.

Tests: a download with an extension gets filters, one without does not, and
the context menu path is covered as well.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:40:18 +00:00
..