Project

General

Profile

Actions

Bug #15767

closed

Clicking the picture widget image downloads the image with an invalid filename instead of showing it inline

Added by Manuel Carrera 3 months ago. Updated 20 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Dashboard
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
25.03
Release Notes:
Default
Affected Version:
Affected Architecture:

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!

Actions #1

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

Actions #2

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.

Actions #3

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.

Actions #4

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
Actions #5

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

Actions #6

Updated by Jordan G about 1 month ago

seems to be working as intended with 24.11-release

Actions #7

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.

Actions #8

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.

Actions #9

Updated by Jim Pingle about 1 month ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #10

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

Actions #11

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.

Actions #12

Updated by Jim Pingle 28 days ago

  • Status changed from In Progress to Feedback
Actions #13

Updated by Jim Pingle 28 days ago

  • Plus Target Version changed from 25.01 to 25.03
Actions #14

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

Actions #15

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
Actions

Also available in: Atom PDF