jag har provat en massa men fattar inte hur jag skall få in filnamnet i en session.. så här ser min kod ut..
Response.Expires=0
Response.Buffer = TRUE
Response.Clear
'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
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")
'Create FileSytemObject Component
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
' Vart ska bilderna läggas på servern?
' Måste ändras
path = "d:\clients\version3.0\wwwroot\image\small\"
'Create and Write to a File
Set MyFile = ScriptObject.CreateTextFile(path & filename)
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
%>
<b>Uppladdad bild: </b><%=filename%><BR>
<img src="../image/small/<%=filename%>">
<!--#include file="upload.asp"-->