binwiederhier / ntfy

Send push notifications to your phone or desktop using PUT/POST
https://ntfy.sh
Apache License 2.0
18.66k stars 734 forks source link

Web app and iOS PWA does not display image attachments with no file extension #1011

Closed MisterSeagull closed 1 month ago

MisterSeagull commented 10 months ago

:lady_beetle: Describe the bug Attachment image links without a file extension are not treated as images and do not display within the notification in the web app.

Jellyfin does not append an image extension to it's /Images/Primary/ endpoint. When I use the endpoint to dynamically attach a thumbnail to my notification I'm left with an attachment with a file icon named Primary that opens the image in a new tab when I click on it.

:computer: Components impacted web app, iOS PWA

:bulb: Screenshots and/or logs image

image

:crystal_ball: Additional context I have tried adding the file header in an attempt to rename the image but that doesn't change anything and if I append a file extension to the URL the image breaks.

MisterSeagull commented 1 month ago

The solution was to add the Filename property as shown below:

"Attach": "{{{ServerUrl}}}/Items/{{{ItemId}}}/Images/Primary",
"Filename": "Primary.jpg",