Print Page | Close Window

File Type Error When Uploading: Status

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=25214
Printed Date: 04 April 2026 at 2:15am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: File Type Error When Uploading: Status
Posted By: Apps4Me
Subject: File Type Error When Uploading: Status
Date Posted: 27 January 2008 at 12:37am
Ok, I did my duty and searched as much as I can, can't seem to find a resolution to the problem I'm having.
 
.jpg and .gif files upload fine, other like .pdf and .doc generate the "The file uploaded is of the wrong type"
 
I have tried ALL of the different upload types (aspupload, dundas, etc..), no difference.
 
Multiple different files, no difference.
 
File extension list is fine, tried with and without "." in front of the extension.
 
I'm running 9.06
 
Suggestions?
 
>>>>SEE UPDATE BELOW!!!
 



Replies:
Posted By: Nick-V
Date Posted: 27 January 2008 at 12:50am
In the Admin area go to Upload Settings and specify the files you wish to allow.


Posted By: Apps4Me
Date Posted: 27 January 2008 at 12:55am
Originally posted by Apps4Me Apps4Me wrote:

 
File extension list is fine, tried with and without "." in front of the extension.
 
 
pdf;zip;rar;doc;txt;rtf;gif;jpg;png


Posted By: Nick-V
Date Posted: 27 January 2008 at 12:59am

Did you see Image Types AND File Types?



Posted By: Apps4Me
Date Posted: 27 January 2008 at 2:38am

Detailed update:

Through careful stepping, I have determined that it is the following section in function_upload.asp (lines 557-568) where blnExtensionOK is getting set to false
(I changed the code to set it to TRUE if there was disallowed html and pdf and word files would upload).
 
'If the file type is an image do some futher checking
   ElseIf strExtension <> ".gif" OR strExtension <> ".jpg" OR strExtension <> ".png" OR strExtension <> ".jpeg" OR strExtension <> ".jpe" OR strExtension <> ".tiff" OR strExtension <> ".bmp" Then
    'Loop through the array of disallowed HTML tags
    For lngLoopCounter = LBound(saryUnSafeHTMLtags) To UBound(saryUnSafeHTMLtags)
      
     'If the disallowed HTML is found remove it and start over
     If Instr(1, strTempFile,  saryUnSafeHTMLtags(lngLoopCounter), 1) <> 0 Then
      blnExtensionOK = False
    
     End If
    Next
   End If

With the False above changed to True, all file extensions will upload!
 
Obviously the False is not a typo, but I think the wrong type of files are being scanned in this section.
 
QUESTION:  The comment on this section of code implies it is doing extra checking if it is an image type, but then it only looks for files WITHOUT standard image extensions.
 
Should all the "<>" be "="  ??????
 

 


Posted By: Nick-V
Date Posted: 27 January 2008 at 12:36pm
When you upload a PDF or DOC are you using the File Upload button? I suspect you are trying to upload a file as an image using the Insert Image button.


Posted By: Apps4Me
Date Posted: 27 January 2008 at 2:00pm
Originally posted by Nick-V Nick-V wrote:

When you upload a PDF or DOC are you using the File Upload button? I suspect you are trying to upload a file as an image using the Insert Image button.
 
Thanks Nick, but you'd be wrong suspecting that.  Dig in the code, the parts I'm referencing are called no matter what type of upload is selected.
 
I need a Mod with experience with the code to answer this.


Posted By: StarDust
Date Posted: 27 January 2008 at 2:05pm
Apps4Me, You should upgrade to v9.07 or v9.08 as v9.06 had some issues with uploading images edited by ADOBE.

-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: Apps4Me
Date Posted: 27 January 2008 at 8:10pm
RESOLVED!! Star
 
In version 9.08 the bug is corrected, and all the "<>" are changed to "="
 
Question:  I've pretty heavily tweaked many of the pages that display the forum, so am reluctant to do a full upload of version 9.08 (I'm running 9.06).
 
Is there somewhere I can find a list of the files that are changed from version 9.06 to 9.08 so I can carefully upgrade without losing all my tweaks?


Posted By: iSec
Date Posted: 27 January 2008 at 9:18pm
Originally posted by Apps4Me Apps4Me wrote:

Is there somewhere I can find a list of the files that are changed from version 9.06 to 9.08 so I can carefully upgrade without losing all my tweaks?
 
Sure, check out the release notes for effected files since the last release: http://www.webwiz.net/webwizforums/kb/release_notes.asp - http://www.webwiz.net/webwizforums/kb/release_notes.asp


-------------
"When it gets dark enough, you can see the stars"
-Charles A. Beard


Posted By: Apps4Me
Date Posted: 27 January 2008 at 10:46pm
dang, you guys make it to easy... and to think that if I had just looked at the release notes in the first place... Smile



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net