Hmm... Kanske är det jag som gör fel!? Måste jag över huvud taget *spara* filen!? Detta fungerar med ASPSmartUpload på annan webbplats:
' ## Only allow jpg or jpeg files
mySmartUpload.AllowedFilesList = "jpg,jpeg"
'on error resume next
' ## UPLOAD FILE
mySmartUpload.Upload
' ## CHECK IF FILE EXISTS
DIM fso, myFileName, myArray
DIM strFileName, strExt, intCounter
SET fso = CreateObject("Scripting.FileSystemObject")
myFileName = mySmartUpload.Files.Item(1).FileName
' ## REPLACE SIGNS
myFileName = replace(myFileName, " ", "_")
myFileName = replace(myFileName, "é", "e")
myFileName = replace(myFileName, "å", "a")
myFileName = replace(myFileName, "ä", "a")
myFileName = replace(myFileName, "ö", "o")
myFileName = replace(myFileName, "É", "E")
myFileName = replace(myFileName, "Å", "A")
myFileName = replace(myFileName, "Ä", "A")
myFileName = replace(myFileName, "Ö", "O")
IF fso.fileExists( server.MapPath("\files\" & myFileName ) ) THEN
myArray = split( myFileName, ".", -1, 1)
strFileName = myArray(0)& "_"
intCounter = 1
strExt = "." & myArray(1)
myFileName = strFileName & intCounter & strExt
' ## CHECK FOR DUPLICATES
WHILE (fso.fileExists(server.MapPath("\files\" & myFileName)))
myFileName = strFileName & CInt(intCounter) +1 & strExt
intCounter = intCounter + 1
WEND
END IF
' ## CHECK FOR FILE
IF NOT mySmartUpload.Files.Item(1).IsMissing Then
' ## SAVE FILE
mySmartUpload.Files.Item(1).SaveAs(server.MapPath("\files\") & "\" & myFileName)
' ## NEW POST
SQL = "INSERT INTO [" & myTable & "] (strName, dteCreated, dteViewFrom, dteViewTo, " _
& " intSortfield, strFileName, intCompanySessionID, intRotate, bolView ) SELECT " _
& "'" & myFileName & "' " _
& ", #" & date() & "# " _
& ", #" & date() & "# " _
& ", #" & date() & "# " _
& ", (COUNT(*)+1) " _
& ", '" & myFileName & "'" _
& ", " & myID _
& ", 0 " _
& ", TRUE " _
& " FROM [" & myTable & "] WHERE intCompanySessionID = " & myID & ";"
Så rörigt... hoppas tanken lyser i alla fall!