Bug on Image File Extension - phpBB Gallery
Bug on Image File Extension
When I right click with mouse to save the image, the browser doesn't show the file extension, and it adds an "_" in the end. And I don't know if it's an jpg or png or bmp, etc.
EDIT: Basically the file extension doesnt appear for the /mini image
-
- Registered User
- Posts: 874
- Joined: Sat Feb 18, 2012 1:51 pm
- Contact:
Re: Bug on Image File Extension
'ACP_MEDIUM_DIR_STATE' => '<strong>./files/phpbbgallery/core/meduim/</strong> state',
should be /medium/ not /meduim/
-
- Registered User
- Posts: 874
- Joined: Sat Feb 18, 2012 1:51 pm
- Contact:
Re: Bug on Image File Extension
Example, my image title is: "Metropolis - City"
The chrome is the worse one since it doesnt't show the extension of the image when we try to download: "Metropolis - City_"
In Edge and IE the extension appears but the spaces are shown as %20: Metropolis%20-%20City.png
Firefox is OK: Metropolis - City.png
I don't know why this happens either. Intriguing.
Become my Patreon!
phpBB Portugal Translator and Moderator
- Leinad4Mind
- Translator
- Posts: 863
- Joined: Sun Jun 01, 2008 11:08 pm
- Contact:
Re: Bug on Image File Extension
Solution will be to escape the special chatlrs.
If you want custom functions in some of my products - PM me and we will discuss it.
-
- Registered User
- Posts: 1310
- Joined: Sun Jul 29, 2012 5:48 am
- Name: Stanislav Atanasov
- Contact:
Re: Bug on Image File Extension
Code: Select all
if(!$this->tool->image_type) {
$this->tool->image_type = $this->tool->extension_by_filename($this->tool->image_source);
if (!$this->tool->image_content_type)
{
trigger_error('NO_EXTENSION_MATCHED');
}
}
-
- Registered User
- Posts: 874
- Joined: Sat Feb 18, 2012 1:51 pm
- Contact:
Re: Bug on Image File Extension
Hello Tarantino,Tarantino wrote:After all this happens because when an image is not watermark one, on the display function on file.php the $this->tool->image_type is empty... so I added:
And created extension_by_filename that checks as the mime function and return the extension of the file. All working great now. But didnt found the root of the problem. Why the watermark image has image_type and not watermark image doesn't.Code: Select all
if(!$this->tool->image_type) { $this->tool->image_type = $this->tool->extension_by_filename($this->tool->image_source); if (!$this->tool->image_content_type) { trigger_error('NO_EXTENSION_MATCHED'); } }
into which line did you put this code?
- Neverlands
- Registered User
- Posts: 117
- Joined: Thu Sep 05, 2002 12:06 am
- Location: Vienna / Austria
- Contact: