Support Forum
Well - as I say - to return that message the file is failing the exif_imagetype() check which ensures the file is a proper jpg, png or gif.
If that works here then it may be a setting on your own server perhaps? Although I have to be honest and say that I do not know what that might be.
It might also be worth you checking that your php 'tmp' folder is correctly set up on the server. Your hosting support should be able to check this. I do not think that would trigger this particular return message but if there is a problem there it might be confused!
YELLOW
SWORDFISH
|
After spending a lot of time trying to find the problem origin, I commented the follwing lines of code in sp-ahah-profile-save.php :
/**
# check image file mimetype
$mimetype = 0;
$mimetype = exif_imagetype($_FILES['avatar-upload']['tmp_name']);
$mimetype = exif_imagetype($uploadfile);
if (empty($mimetype) || $mimetype == 0 || $mimetype > 3) {
$message['type'] = 'error';
$message['text'] = sp_text('Sorry, the avatar file is an invalid format');
return $message;
}
**/
And now, my avatar il correctly uploaded and displayed. I don't understand why exif_imagetype returns an empty string !