Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Can't upload avatar
Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 5, 2014 - 4:53 am

My avatar upload is rejected. This is the file attached to this post.

 

What's the trouble ?

 

Thanks.Pat-Small-50px.jpg

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 5, 2014 - 4:57 am

Sorry, are you talking about it being rejected on this forum? on your own forum? or both.. I have successfully uploaded it on my local working copy

Also when you say 'rejected', what message do you get?

What are your settings in WP Admin > Forum > Profile > Avatars

Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:06 am

The problem is on my own forum :

temp.jpgImage Enlarger

 temp2.jpgImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:12 am

Can you translate that return message for me please? Any any other useful informartion - like avatar priority, avatar set size etc., would be useful.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:23 am

The error message is : "Sorry, the avatar file format is invalid".

The order is :

- By gravatar.com 

- Uploaded avatar

- Default forum avatar

In configuration :

Maximim width : 100 px

Maximum size : 102400

Resizing : 100

Best gravatar ordering : G - allowed for anybody

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:26 am

Curious. What sort of file is it?

Why do you not try uploading it to your profile on this site and see what happens? Be a useful test.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:30 am

By the way - that message is generated if the file being uploaded has an incorrect mime type.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:32 am

 Upload on this forum was successfull..... I don't understand it does'nt work on mine....

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 5, 2014 - 5:47 am

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!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Patrick DUMOLEYN
Member
sp_UserOfflineSmall Offline
Sep 8, 2014 - 9:40 am

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 !

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626