telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.4k stars 5.25k forks source link

Pasting video file results in `file:///` uri being pasted into chatbox #28380

Open PandorasFox opened 2 months ago

PandorasFox commented 2 months ago

Steps to reproduce

  1. copy a video to clipboard, e.g. by Steam game recording 'copy to clipboard' clip export
  2. paste into telegram
  3. file:// uri is pasted as text into message box

Expected behaviour

file should be fetched and treated as if attaching a video (other desktop applications, e.g. discord, handle this fine) or file

Actual behaviour

text uri :(

Operating system

windows 11

Version of Telegram Desktop

5.5.1 x64

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

john-preston commented 2 months ago

Can you show which url is being pasted exactly? I guess I don't treat it as a local file url.

PandorasFox commented 2 months ago

Can you show which url is being pasted exactly? I guess I don't treat it as a local file url.

yeah - file:////%3F/C:/Users/me/AppData/Local/Temp/steam/2507F7DC00003.mp4 is the most recent one

john-preston commented 2 months ago

@PandorasFox Can you check 5.5.4 version? I've reverted a more strict check for the file urls.

PandorasFox commented 2 months ago

@PandorasFox Can you check 5.5.4 version? I've reverted a more strict check for the file urls.

sure thing. on 5.5.5, it instead pops up with this error:

image

The file in question:

image

i'm not entirely sure what's leading to the 'file is empty and can't be sent' since it's definitely a file with bytes in it, though - i assume something with the weird file:// uri not resolving to the file on disk