Login     Sign up
Jpeg is not a valid extension
HometownDirectories (@danyaeldemonic)
Join date: Oct 31st 2011
Community posts: 39
View Profile
Send Message

I'm trying to add a photo to a post, but it tells me that jpeg isn't a valid extension. Where can I change/add to the list of accepted extensions?

153 months ago
ROBERT MILLAR (@millarmr)
Join date: Mar 5th 2011
Community posts: 46
View Profile
Send Message

in file common.inc.php
find and replace
[code] function save_file($file, $allowed_ext = array('jpg','png','gif')) {[code]

with this

[code]function save_file($file) {
$allowed_ext = array('jpg','png','gif','jpeg');[code]

153 months ago
ROBERT MILLAR (@millarmr)
Join date: Mar 5th 2011
Community posts: 46
View Profile
Send Message

hope that works for ya

153 months ago
HometownDirectories (@danyaeldemonic)
Join date: Oct 31st 2011
Community posts: 39
View Profile
Send Message

hmmm mine looks a bit different. That line of code didn't work, but I was able just to add it to the existing code like this:

function save_file($file, $allowed_ext = array('jpg','png','gif','jpeg')) {

Works great now, thanks for pointing out the line for me. I'm still new so i'm learning where everything is

153 months ago