Bug #15767
closedClicking the picture widget image downloads the image with an invalid filename instead of showing it inline
100%
Description
I use the picture widget on the dashboard to show a map of the network, of course the widget is too small so I click on it to get the image in full size when I need to.
But when I do that, the widget forces the download of the image as a file named "widget_image.picture-0", which makes no sense from a user perspective.
I think the file should at least use the name or extension of the uploaded file, so the file can be correctly opened as the image it is. And clicking on the picture widget should not force a download, but instead simply open a new tab directly linking the image, so the user can see it and still be able to download it with a right-click if needed.
Alternatively someone could make a fancy UI that shows the image in a pop-up without leaving the page, but unless there is an easy to implement JS library for that, I don't think this will happen anytime soon, so let's focus on the easier solution... :P
Also just in case I tested this in Vivaldi and Edge and both shows the same outcome, so this problem really comes from how the widget is coded rather than a browser specific behavior.
Thank you for your help!
Updated by dylan mendez 3 months ago
What browser are you using? What pfSense version? I'm unable to replicate on 24.03 Chrome and Firefox
Updated by Manuel Carrera 3 months ago
dylan mendez wrote in #note-1:
What browser are you using? What pfSense version? I'm unable to replicate on 24.03 Chrome and Firefox
Really? I'm surprised.
I have a Netgate 8200 router with pfSense Plus 24.03-RELEASE (amd64).
My PC is on Windows 10 and I used Vivaldi 6.9.3447.54 (with many extensions) and Edge 129.0.2792.89 (x64) in an InPrivate window with no extension.
I also switched my pfSense to english and tried to upload a different image in another format, but the result is the same.
Updated by Manuel Carrera 3 months ago
I should also add that I have the "System Patches" package and applied all recommended system patches, I have no other patch.
Updated by Danilo Zrenjanin 2 months ago
- Status changed from New to Confirmed
I successfully replicated the reported behavior. When I click on the image imported into the widget, it downloads with the name widget_image.picture-0 instead of opening the image.
Tested against:
pfSense Plus 24.03
macOS version 15.0.1 Chrome for macOS browser
Updated by Jordan G about 2 months ago
running 24.11.r.20241112.1813 clicking the picture results in downloading widget_image.png and shows the correct image
Updated by Jordan G about 1 month ago
seems to be working as intended with 24.11-release
Updated by Jim Pingle about 1 month ago
Seems to be browser-specific. Firefox gets the name correct, Chrome/Chromium gets the name wrong. Browsers based on those engines will likely behave similarly depending on their lineage.
Updated by Jim Pingle about 1 month ago
- Status changed from Confirmed to In Progress
- Assignee set to Jim Pingle
- Target version set to 2.8.0
- Plus Target Version set to 25.01
Firefox apparently guesses what the extension should be based on the image type, Chrome takes the name as-is. Looks like a fairly easy fix by explicitly setting the extension based on the image type.
Updated by Jim Pingle about 1 month ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Applied in changeset cb698d2685ef3195bc3813856b0c52143fbdb4d4.
Updated by aleksei prokofiev 30 days ago
Tested on 24.11 with patch applied. In Chrome it just download png file but not open in browser.
24.11-RELEASE (amd64)
built on Wed Nov 27 22:22:00 +04 2024
FreeBSD 15.0-CURRENT
Updated by Jim Pingle 28 days ago
- Status changed from Feedback to In Progress
Download was the intent of the previous commit (and mentioned in the description), but I can see how showing it inline might be more useful. The user could always save it from the browser from that view as well. Main issue is that requires changes to a function that sends the file, it wouldn't be a change self-contained in the widget code, but that's OK.
I have a new change I'll push here in a bit that shows it inline.
Updated by Jim Pingle 28 days ago
- Status changed from In Progress to Feedback
Applied in changeset f7e934bbac273d3557edaa0c1b1c9fd0cc1b69b7.
Updated by Jim Pingle 28 days ago
- Plus Target Version changed from 25.01 to 25.03
Updated by Jim Pingle 27 days ago
- Status changed from Feedback to Resolved
Image now opens up in a new tab displayed in the browser on both Firefox and Chrome. Right Click/Save Image As offers to save the file with the appropriate name and extension
Updated by Jim Pingle 20 days ago
- Subject changed from Clicking on a picture widget downloads a file named "widget_image.picture-0" to Clicking the picture widget image downloads the image with an invalid filename instead of showing it inline