Author |
Topic |
Desmomax
New Member
55 Posts |
Posted - 23 February 2007 : 02:58:14
|
I'll try. Anyway something is wrong.. after i uploaded the file instead of confirmation i receive a blank window 10x < |
Il forum |
|
|
Desmomax
New Member
55 Posts |
Posted - 26 February 2007 : 05:36:20
|
quote: Originally posted by PPSSWeb
Your pop_upload_new.asp looks good, so it should be passing the mLev over to outputFile.asp
Check that your mLev is getting to the outputFile.asp correctly. Insert Response.Write "Member level: " & mLev & vbNewLine
into the code before the test for mLev<3 to make sure it has the correct value.
I tried to insert the Response.Write for Mlev and i obtain a correct value of "4" (logged as admin) but after that the windows is blank, i receive no confirmation that the file is uploaded..
here is what i obtain:
Can you help me? i receive no Error then i dont know where to check...
thanx < |
Il forum |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 26 February 2007 : 09:48:43
|
Ok, problem is in placement of the check for Mlev.
Remove your: If mLev<3 Then and the corresponeding End If (lines 260 and 336)
Then combine the mLev check with the other condition statement to make:
IF (mLev < 3) and ds.Size + bytecount > maxDiskSpace then for line #263.
That should fix it.< |
|
|
Desmomax
New Member
55 Posts |
Posted - 26 February 2007 : 11:18:06
|
many thanx
it works!! :)
i have just a little problem.. if i try to upload a bigger file i receive this error (after the correct window with the advise that the file is too big):
Errore di run-time di Microsoft VBScript error '800a0005'
Chiamata di routine o argomento non validi: 'MidB'
/myforum/upload.asp, line 5
Line 5 is this: boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg)
Do you have any idea? :) < |
Il forum |
Edited by - Desmomax on 26 February 2007 11:18:49 |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 26 February 2007 : 11:36:22
|
Not sure, as search has turned up a lot of instances of this error. Are you trying to upload an allowed extension type?< |
|
|
Desmomax
New Member
55 Posts |
Posted - 27 February 2007 : 03:23:17
|
quote: Originally posted by PPSSWeb
Not sure, as search has turned up a lot of instances of this error. Are you trying to upload an allowed extension type?
The error comes if i try to upload an extension not allowed, or a file too big... i see the correct window with the error message " file not allowed... or... file too big.. etc" then when i click to "back to forum" the error comes.. any idea? < |
Il forum |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 27 February 2007 : 10:24:31
|
quote: Originally posted by Desmomax
The error comes if i try to upload an extension not allowed, or a file too big... i see the correct window with the error message " file not allowed... or... file too big.. etc" then when i click to "back to forum" the error comes.. any idea?
Got it, I was not able to reproduce this in IE, which is what we use here unfortunately, but I was able to reproduce it in FireFox. The problem is the onClick=""history.go(-1);"" part of that link which takes you back into upload.asp code instead of pop_upload_new.asp code in non-IE browsers, or at least in firefox. Solution, change the link.
From:
Response.Write " <p align=""center""><a href=""#"" onClick=""history.go(-1);"" style=""text-decoration: none""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Please click here to go back and choose another file to upload.</font></a></p>" & vbNewline
To:
Response.Write " <p align=""center""><a href=""./pop_upload_new.asp"" style=""text-decoration: none""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Please click here to go back and choose another file to upload.</font></a></p>" & vbNewline
This should force the browser to go back to the pop_upload_new page. < |
|
|
Desmomax
New Member
55 Posts |
Posted - 01 March 2007 : 04:28:28
|
thanx, i'll try it but i got the error with Mozilla FireFox 2.0 ( i use only this browser). < |
Il forum |
|
|
Desmomax
New Member
55 Posts |
Posted - 01 March 2007 : 04:33:49
|
i tried to modify as you suggest, but i still receive the error on line 5 of upload.asp :( < |
Il forum |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 01 March 2007 : 08:35:07
|
quote: Originally posted by Desmomax
i tried to modify as you suggest, but i still receive the error on line 5 of upload.asp :(
Did you force a reload on the upload pages and clear your cache after changing the link?< |
|
|
Desmomax
New Member
55 Posts |
Posted - 02 March 2007 : 08:58:04
|
quote: Originally posted by PPSSWeb
quote: Originally posted by Desmomax
i tried to modify as you suggest, but i still receive the error on line 5 of upload.asp :(
Did you force a reload on the upload pages and clear your cache after changing the link?
Yes, i tried but still the same error... < |
Il forum |
|
|
Desmomax
New Member
55 Posts |
Posted - 02 March 2007 : 10:41:01
|
May i ask you something more? :)
now, with your fix, my >3 level users (moderators, admin) dont have a limit in their upload folder... is it possibile to do not apply as well the max file size limit set with this mod ?
thanks < |
Il forum |
Edited by - Desmomax on 02 March 2007 10:41:49 |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 02 March 2007 : 11:19:07
|
I don't see why you couldn't. You should have everything in place to do that already now. You should just have to wrap the check max file size code in pop_upload_new and outputfile in a similar check (if mLev<3).< |
|
|
Desmomax
New Member
55 Posts |
Posted - 04 March 2007 : 16:44:44
|
quote: Originally posted by PPSSWeb
I don't see why you couldn't. You should have everything in place to do that already now. You should just have to wrap the check max file size code in pop_upload_new and outputfile in a similar check (if mLev<3).
thanks, but i am not sure to know where exact insert the code in pop_upload_new and outputfile...< |
Il forum |
|
|
PPSSWeb
Junior Member
312 Posts |
Posted - 05 March 2007 : 09:03:39
|
I believe the code is the same in both files. Look for: '##### check max file size
strSQL = "SELECT UPLOAD_VALUE FROM " & strTablePrefix & "UPSIZE WHERE UPLOAD_VAR = 'STRUPLOADFILESIZE'"
set rsSize = my_Conn.Execute (strSQL)
strAllowedSize = rsSize("UPLOAD_VALUE")
if bytecount < strAllowedSize then
AllowSize = true
else
AllowSize = false
end if
rsSize.close
set rsSize = nothing
If strAllowedSize < 1024 Then
strAllowedSize = Round(strAllowedSize,2) & " Bytes"
ElseIf strAllowedSize < 1048576 Then
strAllowedSize = Round(strAllowedSize/1024,2) & " KB"
Else
strAllowedSize = Round(strAllowedSize/1048576,2) & " MB"
End If
and change it to:
strAllowedSize = "Not Restricted"
AllowSize = True
'##### check max file size if mLev<3 only
IF (mLev<3)
if
strSQL = "SELECT UPLOAD_VALUE FROM " & strTablePrefix & "UPSIZE WHERE UPLOAD_VAR = 'STRUPLOADFILESIZE'"
set rsSize = my_Conn.Execute (strSQL)
strAllowedSize = rsSize("UPLOAD_VALUE")
if bytecount < strAllowedSize then
AllowSize = true
else
AllowSize = false
end if
rsSize.close
set rsSize = nothing
If strAllowedSize < 1024 Then
strAllowedSize = Round(strAllowedSize,2) & " Bytes"
ElseIf strAllowedSize < 1048576 Then
strAllowedSize = Round(strAllowedSize/1024,2) & " KB"
Else
strAllowedSize = Round(strAllowedSize/1048576,2) & " MB"
End If
End If
I don't have a chance to test this myself right now, but I believe this will do what you want. Try it out and let me know.< |
|
|
Topic |
|