This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I have the following problem:
- When I upload an Image like: example.JPG the thumbnail isnt generated!
- When I upload an Image like: example.jpg everything is working fine.
- When I upload an Image like: example.JPG and go to the Database and manually change in system_files the file_name to example.jpg the thumbnails get generated! Is this a Bug..?
Last updated
I found a solution by chaning file: /vendor/october/rain/src/Database/Attach/File.php Original:
public function isImage() {
return in_array($this->getExtension(), static::$imageExtensions);
}
Solution:
public function isImage() {
return in_array(strtolower($this->getExtension()), static::$imageExtensions);
}
Last updated
@crew, if you solve the issue, please add a new "Pull Request" on https://github.com/octobercms/october/pulls
This solution works locally, but doesn’t work on a staging/live linux server. There are further errors saying invalid image type. It seems to need further changes to the core of October CMS to make this effective. Are there any other solutions / extensions to this solution to allow the use of capitalised file extensions, such as .JPG, to be added successfully? My client will be uploading images from iPhone, which by default adds the .JPG extension.
I think that bug has been adressed with the latest release: https://github.com/octobercms/library/commit/96c570fa6987cfcab5c3169d779cf346a08c27f8
I have correct File.php in my October version (with strtolower), but I still can't see thumbs for .JPG files.. What else could be wrong?
Probably you are using windows and it's not sensitive for lower or upper extensions. .jpg or .JPG both can be found by apache in windows. But linux is sensitive, so it needs to be exact same
So you mean if I run this scripts on Win server, it'll be ok, but on Linux servers this issue can appears?
I tried both lower and upper .jpg and also .png files for user avatar in mac and linux. It works as expected in build 316. I don't know what about windows..
1-11 of 11