View Issue Details

IDProjectCategoryView StatusLast Update
468RackTablesdefaultpublic2011-10-08 17:56
Reporteruser167Assigned Toinfrastation  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.7 
Target Version0.19.10Fixed in Version0.19.10 
Summary468: Uploaded PNGs aren't shown as images
DescriptionI've uploaded PNGs for racks and they're not displayed as images. After checking with the File database, I found, that they're uploaded with type "x-png". The attached patch enables racktables to support x-png-MIME-type, too.
TagsNo tags attached.

Activities

2011-09-09 11:21

 

racktablesxpng.patch (734 bytes)   
### Eclipse Workspace Patch 1.0
#P racktables
Index: wwwroot/inc/interface.php
===================================================================
--- wwwroot/inc/interface.php	(Revision 248)
+++ wwwroot/inc/interface.php	(Arbeitskopie)
@@ -6679,6 +6679,7 @@
 				break;
 			case 'image/jpeg':
 			case 'image/png':
+			case 'image/x-png':
 			case 'image/gif':
 				printImageHREF ('image file');
 				break;
@@ -6849,6 +6850,7 @@
 		// "These types will be automatically detected if your build of PHP supports them: JPEG, PNG, GIF, WBMP, and GD2."
 		case 'image/jpeg':
 		case 'image/png':
+        case 'image/x-png':
 		case 'image/gif':
 			$file = getFile ($file['id']);
 			$image = imagecreatefromstring ($file['contents']);
racktablesxpng.patch (734 bytes)   
infrastation

infrastation

2011-09-11 19:23

administrator   ~0000428

But, well, the right MIME type is "image/png", isn't it?
infrastation

infrastation

2011-09-24 07:45

administrator   ~0000432

http://stackoverflow.com/questions/2086374/what-is-the-difference-between-image-png-and-image-x-png

The right solution would be to accept the old MIME type for the purpose of mapping it into the right MIME type.
infrastation

infrastation

2011-10-08 17:56

administrator   ~0000437

This issue should be resolved in the next release, please reopen in case it is not. Thank you!

Issue History

Date Modified Username Field Change
2011-09-09 11:21 user167 New Issue
2011-09-09 11:21 user167 File Added: racktablesxpng.patch
2011-09-11 19:23 infrastation Note Added: 0000428
2011-09-11 19:24 infrastation Status new => assigned
2011-09-11 19:24 infrastation Assigned To => infrastation
2011-09-24 07:45 infrastation Note Added: 0000432
2011-09-24 07:45 infrastation Target Version => 0.19.10
2011-10-08 17:56 infrastation Note Added: 0000437
2011-10-08 17:56 infrastation Status assigned => closed
2011-10-08 17:56 infrastation Resolution open => fixed
2011-10-08 17:56 infrastation Fixed in Version => 0.19.10