<%@ Language=VBScript %> <%Response.Buffer=true%> <% totbytes=request.totalbytes requestbin=request.binaryread(totbytes) 'Creating new folder to store the images set newuserfolderobj=server.CreateObject("Scripting.Filesystemobject") if newuserfolderobj.FolderExists(server.MapPath("." & "/" & "images")) =true then else newuserfolderobj.CreateFolder server.MapPath("." & "/" & "images") end if set uploadrequest=SERVER.CreateObject("scripting.dictionary") Builduploadrequest requestbin 'method to upload the image filepath=uploadrequest.item("fupload").item("FileName") filename=right(filepath,len(filepath)-instrrev(filepath,"\")) if filename<>"" then filecontent=uploadrequest.item("fupload").item("Value") 'Creating the actual Image File set fso=server.createobject("scripting.filesystemobject") set myfile=fso.createtextfile(server.mappath("." & "/" & "images" & "/" & filename)) session("logopath")=session("name") & "/" & filename for i=1 to lenb(filecontent) myfile.write chr(ascb(midb(filecontent,i,1))) next myfile.close set fso=nothing end if %> <%=SiteName%> - Welcome
       
  <%=SiteName%> Home     Logout  
 

Uploaded Successfully

Upload More Images