element-hq / element-hq/element-web

Unique filenames for downloaded images

Open
#19,155 5 comments 1 reaction 0 assignees View on GitHub
A-File-Download A-Media O-Occasional S-Minor T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

When other users send images from their clipboards (or by drag and drop), the files are given generic names such as `image.jpg` or `image.png`. This presents a problem for the receiving user(s) when downloading the image within Element, as the user is prompted to either overwrite an existing file with the same name, or give a unique name to the image.

This can be quite tedious, and effectively defeats the benefit of the easy-to-access download button next to each message, since the user has to stop and give a unique filename to each downloaded image.

I propose having Element automatically name files based on their Matrix Content IDs (`mxc://`) when downloaded, if they would otherwise have an `image.*` filename.

### Have you considered any alternatives?

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by tracing the image download button and the code that assigns fallback image.* filenames; done means downloads that would otherwise use a generic image name receive a unique name based on the Matrix mxc:// content ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.