We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

image format | Forum

Jerome
Jerome Oct 7 '13
Is there anyway that i can modify the upload image is for .jpeg and .png only?? i don wanna have .gif format in my website because it's very messy >.<
fbkca
fbkca Oct 7 '13
Remove , 'gif' from the line below, which is found in ow_system_plugins/base/controllers/attachment.php:


        if ( !in_array(UTIL_File::getExtension($_FILES['attachment']['name']), array('jpeg', 'jpg', 'png', 'gif')) )


untested so use at your own risk. Someone else may want to validate that...

The Forum post is edited by fbkca Oct 7 '13
fbkca
fbkca Oct 7 '13
You may also want to update this line:


ow_system_plugins/base/controllers/media_panel.php


OW::getFeedback()->error("Invalid file type. Acceptable file types: JPG/PNG/GIF");                                                                       



The Forum post is edited by fbkca Oct 7 '13
Jerome
Jerome Oct 7 '13
im using a ampps test server... I've tested, but i can still upload .gif image... and i also updated the media_panel.php, but im still seeing this .gif in my profile...



fbkca
fbkca Oct 7 '13
The Text you see ON the page there would be found in your lang section in the admin panel... ({text key='base+avatar_upload_types'})


then clear your cache, both site and browser.

The Forum post is edited by fbkca Oct 7 '13
Jerome
Jerome Oct 9 '13
Quote from fbkca Remove , 'gif' from the line below, which is found in ow_system_plugins/base/controllers/attachment.php:


        if ( !in_array(UTIL_File::getExtension($_FILES['attachment']['name']), array('jpeg', 'jpg', 'png', 'gif')) )


untested so use at your own risk. Someone else may want to validate that...



Quote from fbkca You may also want to update this line:


ow_system_plugins/base/controllers/media_panel.php


OW::getFeedback()->error("Invalid file type. Acceptable file types: JPG/PNG/GIF");                                                                       




I've tested this 2, but i can still upload .gif image =( ... is there any solutions ??
ross Team
ross Oct 9 '13
Topic was moved from General Questions.
Daisy Team
Daisy Oct 17 '13
Jerome, as far as I've understood you are talking about the avatar feature. If so, go to /ow_utilities/file.php file and remove the gif extension.
Jerome
Jerome Oct 21 '13
Daisy, is this removal of .gif extension for the whole website or for avatars only?? I want the .gif to be blocked from my whole website...
Daisy Team
Daisy Oct 23 '13
 It will affect all plugins and features that use the functionality described in this file. But it depends on the plugins developers - they decide whether to use the standard functions or add a custom check.
Jerome
Jerome Oct 23 '13
ok understood... thank u very much
Jerome
Jerome Oct 25 '13
Daisy, i've removed .png & .gif extension from file.php... It works for Avatar and Image upload... But it doesn't work for Forum "Attach Image" i can still attach .gif & .png extension


and also, in news feed is kinda weird... I cant attach .gif but i can attach .png still >.<

Daisy Team
Daisy Nov 1 '13
You should go to /ow_system_plugins/base/controllers/attachment.php file and remove the unnecessary extensions.