element-hq / element-hq/element-ios

Video downloads renamed to "Video.mp4" and preview unavailable due to missing filename while uploading file from iOS app

Open
#7,945 2 comments 0 reactions 0 assignees View on GitHub
A-Media O-Occasional S-Tolerable T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

Open the Element iOS app and initiate a private conversation with another user.
Using the Element iOS app, send a video file to the other user. Ensure the video has a specific filename (e.g., "ProjectPresentation_v2.mp4").
On the receiving device using Element Web open the conversation and attempt to download the video sent from the iOS app.

### Outcome

#### What did you expect?

The downloaded video should retain its original filename ("ProjectPresentation_v2.mp4" in this example).
A preview of the video should be displayed within Element Web before downloading.

#### What happened instead?

The downloaded video is renamed to "Video.mp4."
No video preview is available on the receiving device.

#### Related issue:
According to investigation, this is due to the sending iOS Element client not including a filename in the Matrix send request. The Matrix specification dictates that if no filename is provided, the body of the request is used. Without a matching file extension for the mimetype (video/mp4), Element sanitizes the filename during download as a security measure (GHSA-5486-384g-mcx2).
See more here: https://github.com/element-hq/element-web/issues/30166

### Your phone model

_No response_

### Operating system version

_No response_

### Application version

_No response_

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.