Error uploading image, wrong file type
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29159
Printed Date: 01 April 2026 at 12:39pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Error uploading image, wrong file type
Posted By: Jesper kick
Subject: Error uploading image, wrong file type
Date Posted: 02 March 2011 at 6:23am
Hi Web Wiz Forum
Normally there is no problems with uploading images of the file type .jpg, but some times I get the error message "wrong file types". I can see no clear connection with when I get the error message and the image files I try to upload.
The messages I get is:
Const strTxtErrorUploadingImage = "Error uploading image!!" Const strTxtImageOfTheWrongFileType = "The image uploaded is of the wrong file type"
I think is due to the variable "blnExtensionOK" is set to false, but as far as I can see it is not set in the "Function fileExtension".
I am using ASP Upload.
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 03 March 2011 at 7:26am
|
What version of Web Wiz Forums are you using?
There is a known issue with older versions where images created and edited in newer Adobe software can cause the security filters to reject the image as Adobe now hides hidden XML within the images source code which can fire a false positive with the forums security filters scanning for malicious content hidden in the image source code.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Jesper kick
Date Posted: 03 March 2011 at 7:11pm
Hi Bruce I using version 9.50 of the Forum. Is there any specific files I have to user from ex version 9,7? But there is also problems with old jpg files from eg. 2003, so maybe it is another problem?
It seems that the wrong error is generated in section '*** Security check for MIME change **** in functions_upload.asp
Kind regards Jesper Kick
|
Posted By: 123Simples
Date Posted: 03 March 2011 at 8:22pm
The best bet would to be to upgrade your forum software - it would be safer and more secure to do so, even if it means ploughing through any modifications you may need to make
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: Jesper kick
Date Posted: 03 March 2011 at 8:44pm
Hi MrTWS A very good idea, but I have the usual error to many modifications
|
Posted By: 123Simples
Date Posted: 04 March 2011 at 12:41pm
Hi JK The differences between 9.50 and 9.70 are quite substantial, however, it is not an impossibility to actually make the jump. Providing you make a current BACKUP of the forum and database (as it is now), you could run the upgrade, and then work back in the modifications from there. Another alternative is to consider what another forum member did, when they asked me to run the new software on one of our test forums, work back in the modding they had done, and then we switched the software over that way for them. It was paid for (but it did not cost them a fortune), and now they have a upgraded software running without any issues, and best of it all, it still maintained nearly all of the characteristics they originally had, but with better security!
PM me if you might like to chat about this further
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: Jesper kick
Date Posted: 04 March 2011 at 7:58pm
Hi MrTWS Thanks for your suggestions, I will think about it and return ;o) Jesper Kick
|
Posted By: 123Simples
Date Posted: 05 March 2011 at 7:21pm
You're welcome Jesper
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: omegaman
Date Posted: 12 March 2011 at 9:45am
I have a slightly different issue. I feel certain it is addressed somewhere, but I cannot find it, so if it has been addressed and someone knows where, could you please point me to it.
I am a user on a forum that uses v.9.5. Many of the members there cannot upload images and avatars. Most of us can, out of 300 or so members, there are probable 30 that are really active posters, of the thirty, probably 5 cannot post images.
Since most of us can, I figure the problem is not with the forum software, but with some settings on their own computers. Does anyone have a solution to this that I can pass on to them? The administration of those forums are inactive, and I don't think they know much about the software or care to. Anyway, I would appreciate it if someone can point me in the right direction and maybe help these people out.
Thanks a lot.
|
Posted By: WebWiz-Bruce
Date Posted: 12 March 2011 at 10:20am
Same advise as to the original posted you need to upgrade to the latest release as there are known issues with uploading in 9.50
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Jesper kick
Date Posted: 12 March 2011 at 10:54am
Hi omegaman I'am working on upgrading from version 9.50 to 9.70 due to this error. The problem is in module: functions_upload.asp, which has changed in version 9.70.
A hack to solve the problem until you have upgratede is: 1. Find the section '*** Security check for MIME change **** (line 501) 2. Find the code lines (line 579) 'If the file extension is not OK then delete file If blnExtensionOK = False Then file.Delete 3. Before this you insert the following lines If not blnExtensionOK then If lcase(right(strNewFileName,3)) = "jpg" or lcase(right(strNewFileName,4)) = "jpeg" or lcase(right(strNewFileName,3)) = "gif" or lcase(right(strNewFileName,3)) = "png" then blnExtensionOK = vbtrue End If End If
Please remark: This hack overrules that security check, that the uploaded image file may not be an image.
good luck
|
|