<code><% sokveg = UploadRequest.Item("sokveg").Item("Value")uploaden krånglar
if request.querystring("upload") = "yes" then
'Response.BinaryWrite(Request.BinaryRead(Request.TotalBytes))
byteCount = Request.TotalBytes
'Response.BinaryWrite(Request.BinaryRead(varByteCount))
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
'Exempel på hur man kan 'plocka ner' andra forumlärelement
'email = UploadRequest.Item("email").Item("Value")
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = UploadRequest.Item("blob").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
value = UploadRequest.Item("blob").Item("Value")
sokveg = UploadRequest.Item("blob").Item("sokveg")
'Create FileSytemObject Component
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
'Create and Write to a File
pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14
' Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd)&filename)
Set MyFile = ScriptObject.CreateTextFile(Server.mappath(""&sokveg&""&filename))
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
Response.Write "<script language=""Javascript"">alert('Upload finished!');window.location='default.asp';</script>"
%></code>
--------------
filen lägger sig inte i frexuz\ när jag skriver ..\ i formen
denna filen ligger i frexuz\upload--------------
om jag ändrar
Set MyFile = ScriptObject.CreateTextFile(Server.mappath(""&sokveg&""&filename))
till
Set MyFile = ScriptObject.CreateTextFile(Server.mappath("../"&filename))
så funkar detSv: uploaden krånglar
-----------
Set MyFile = ScriptObject.CreateTextFile(Server.mappath(sokveg&filename))
löste det