Discuss Shadow Uploader - uploading large files in the ASP Development forum on ASP Free. Shadow Uploader - uploading large files ASP Development forum discussing ASP related topics including coding practices, ASP tips, and more. Active Server Pages (ASP) enables you to empower your HTML pages dynamically with robust scripting options.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.
Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.
disable friendly errors of IE:
Tools --> Internet Options --> Advanced --> uncheck the
"show friendly http error messages" and confirm.
when you have full error message post it here and we can
help you further. also, what server you got?
Posts: 4
Time spent in forums: 1 h 27 m 44 sec
Reputation Power: 0
thx
hihi~ sorry for reply in late~ actually I am doing something like this:
Code:
ElseIf strComp(Request.QueryString("act"), "upload") = 0 then
strSql = "Select * from TBLMEMBER where MEM_ID = " & Cint(Request.QueryString("id"))
Set rsSql = Server.CreateObject("ADODB.Recordset")
'on error resume next
rsSql.Open strSql, GlobalConn, 3, 3
if not rsSql.EOF then
Set objUpload=New ShadowUpload
If objUpload.GetError<>"" Then
Response.Write("sorry, could not upload: "&objUpload.GetError)
rsSql.Close
set rsSql = Nothing
globalConn.Close
Set golbalConn = Nothing
Response.Redirect ("members.asp?act=up_err")
Else
Response.Write("found "&objUpload.FileCount&" files...<br />")
For x=0 To objUpload.FileCount-1
Response.Write("file name: "&objUpload.File(x).FileName&"<br />")
filename = objUpload.File(x).FileName
Response.Write("file type: "&objUpload.File(x).ContentType&"<br />")
Response.Write("file size: "&objUpload.File(x).Size&"<br />")
Response.Write("image width: "&objUpload.File(x).ImageWidth&"<br />")
Response.Write("image height: "&objUpload.File(x).ImageHeight&"<br />")
If (objUpload.File(x).ImageWidth>200) Or (objUpload.File(x).ImageHeight>200) Then
Response.Write("image to big, not saving!")
rsSql.Close
set rsSql = Nothing
globalConn.Close
Set golbalConn = Nothing
Response.Redirect ("members.asp?act=up_big")
Else
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(Server.MapPath(path)) then
If len(rsSql("mem_imgPath")) <> 0 Then
fileNm = rsSql("mem_imgPath")
If (fso.FileExists(fileNm)) Then
Set MyFile = fso.GetFile(fileNm)
MyFile.Delete
end if
End If
end if
'fso.Close
set fso = Nothing
Call objUpload.File(x).SaveToDisk(Server.MapPath(path), "")
Response.Write("file saved successfully!")
End If
Response.Write("<hr />")
Next
Response.Write("thank you, "&objUpload("name"))
End If
rsSql("mem_imgPath") = Server.MapPath(path) & "\" & filename
rsSql.Update
'log save start
Set rsLog = Server.CreateObject("ADODB.Command")
strLog = "Insert Into TBLADMINLOG (ALOG_DATE,ALOG_EVENT,ALOG_ACTION,ADM_ID,ALOG_SESS IONID) Values ('" & Now() & "','PHOTO UPLOADED','" & ucase(Session("AdminName")) & " UPLOAD','" & Session("AdminID") & "','" & Session.SessionID & "-" & Session.LCID & "')"
rsLog.ActiveConnection = globalConn
rsLog.CommandText = strLog
rsLog.Execute
Set rsLog = Nothing
'log save end
rsSql.Close
set rsSql = Nothing
globalConn.Close
Set golbalConn = Nothing
Response.Redirect ("members.asp?act=upload")
end if
rsSql.Close
set rsSql = Nothing
globalConn.Close
Set golbalConn = Nothing
Response.Redirect ("members.asp?act=no")
Else
Last edited by Shadow Wizard : September 20th, 2006 at 06:42 AM.
Reason: added [Code] and [/Code] tags around code - please do that yourself next!
Posts: 31,109
Time spent in forums: 3 Months 3 Weeks 2 Days 20 h 18 m 8 sec
Reputation Power: 2919
I did not ask for the whole code (although it may come handy later) -
I asked what error you get and on what line.
without such information we can't help you, sorry.
also, wrap code with code tags ([Code] and [/Code]) next.
Posts: 4
Time spent in forums: 1 h 27 m 44 sec
Reputation Power: 0
actually I quite dun understand the file upload flow... Base on wat I know, while sending a file, it will convert the data into binary and put in a stream... then send to the server, if let say the file is about 10MB, then it will take a quite long time to send out the whole stream. But while I using ur code, it look like didnt send out the data and directly direct to a error page, izzit setting the file size causing this? Because I hav do something like this b4, but not using ur source. During that time, I send the file without set the file size in asp and it will send the file out, only when it take to long time, then it show script time out (i didnt disable it)... but now it look like juz redirect the page to the error page after submit the form...
Posts: 31,109
Time spent in forums: 3 Months 3 Weeks 2 Days 20 h 18 m 8 sec
Reputation Power: 2919
Quote:
Originally Posted by tanwy83
actually I quite dun understand the file upload flow... Base on wat I know, while sending a file, it will convert the data into binary and put in a stream... then send to the server, if let say the file is about 10MB, then it will take a quite long time to send out the whole stream. But while I using ur code, it look like didnt send out the data and directly direct to a error page, izzit setting the file size causing this? Because I hav do something like this b4, but not using ur source. During that time, I send the file without set the file size in asp and it will send the file out, only when it take to long time, then it show script time out (i didnt disable it)... but now it look like juz redirect the page to the error page after submit the form...
what you mean "error page"?
if you see on your screen error message post it here.
if you can't understand what I'm saying I fear I can't help
you and you'll have lots of trouble to get help from others
as well.
if you wish to discuss what is upload and how it works feel free
to start new thread and I'll happily join it, but not here in this
thread.
Last edited by Shadow Wizard : September 20th, 2006 at 07:30 AM.
Posts: 4
Time spent in forums: 1 h 27 m 44 sec
Reputation Power: 0
okok
Quote:
Originally Posted by Shadow Wizard
what you mean "error page"?
if you see on your screen error message post it here.
if you can't understand what I'm saying I fear I can't help
you and you'll have lots of trouble to get help from others
as well.
if you wish to discuss what is upload and how it works feel free
to start new thread and I'll happily join it, but not here in this
thread.
Wait me do more research on it 1st, I currently busy on other thing... then I will open a new thread after I go through more on it... Thx a lot...
1 more quetion before I end this msg, wat the maximum size for this script can afford?