VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: dazzafact on April 30, 2015, 10:29:31 AM

Title: 3.0.6.2 - File extention Uppercase - 404
Post by: dazzafact on April 30, 2015, 10:29:31 AM
I have a Product with Uppercase Image extention "file_url" (JPG) (uploaded manuel). The image will not be shown in der Shop.
I fixed that in the file -/helpers/image.php Line 62 (function displayMediaFull);
It was creating me a lowercase file_extension $string

$this->file_extension=preg_replace('#^.*\.([A-z]+)$#is','$1',$this->file_url);
Title: Re: 3.0.6.2 - File extention Uppercase - 404
Post by: Digi-web on April 30, 2015, 11:14:14 AM
Can you give more info where exactly (in which line) you did the change?
So if you upload an uppercase .jpg it is not uploaded correctly right? and with the fix this is corrected?
Title: Re: 3.0.6.2 - File extention Uppercase - 404
Post by: dazzafact on April 30, 2015, 11:19:55 AM
I dont know, but its for manuell uploadet and linked images. I think the automatic uploadet process in the backend will change Uppercase file extension to lower.
Title: Re: 3.0.6.2 - File extention Uppercase - 404
Post by: Milbo on April 30, 2015, 12:23:24 PM
So you upload an image with .JPG, which is renamed on the server to .jpg, right.

So the question is, why you have JPG in the database.
Title: Re: 3.0.6.2 - File extention Uppercase - 404
Post by: Milbo on April 30, 2015, 12:24:23 PM
ahh, you uploaded it manually, and you did not use the synchronisation or upload function, okey. Then this can happen, yes. But how you got the wrong entry in the media table?
Title: Re: 3.0.6.2 - File extention Uppercase - 404
Post by: dazzafact on April 30, 2015, 15:51:05 PM
It was created by a batched import.
Anyway, the "file_url" is still linked correct to the image.
(http://fs2.directupload.net/images/150430/ktzzpm5s.jpg) (http://www.directupload.net)
But it override me the extention to lowercase (jpg) in frontend