![]() |
Admin 10/15/2004 |
Dan, if Request.TotalBytes>0 then ' Instantiate Upload Class Set objUpload = New clsUpload ' Grab the file name strFileName = objUpload.Fields("File1").FileName Set objConn = Server.CreateObject("ADODB.Connection") Set objRs = Server.CreateObject("ADODB.Recordset") objConn.Open strConnection objRs.Open "SELECT " & strPK & ", " & AddWrappers(strField) & " FROM " & AddWrappers(strTable) & " WHERE " & sWhere, objConn, adOpenKeyset, adLockOptimistic objRs.Fields(strField).AppendChunk objUpload("File1").BLOB & ChrB(0) objRs.Update objRs.Close Set objRs = Nothing Set objConn = Nothing Set objUpload = Nothing Response.Write "File has been saved in database<BR><BR>" end if
if Request.TotalBytes>0 then ' Instantiate Upload Class Set objUpload = New clsUpload ' Grab the file name strFileName = objUpload.Fields("File1").FileName objUpload("File1").SaveAs(Server.MapPath("/Uploads/") & "\" & objUpload("File1").FileName) Set objUpload = Nothing Response.Write "File has been saved<BR><BR>" end if
|
|
501100 10/19/2004 |
Sergey, Dim objUpload |
![]() |
Admin 10/19/2004 |
Dan,
|
|
501101 10/20/2004 |
Sergey, |
P
|
primusvarun 9/18/2007 |
HI, This is varun Dan, this pretty easy to implement. You will need to modify uploader.asp file for this purpose. Here is the code section that you need to modify: Here is how you need to modify it: Just make sure you have changed upload directory name and assigned write permissions to this directory. |