Aspupload fejl?
HejJeg er ved at lave et system til en bilforhandler. Jeg har fundet et script (moviedb_dk) som næsten passede.
Scriptet bruger komponenten ASPSmartUpload, hvor min server understøtter AspUPLOAD.
Jeg har nu prøver at ændre scriptet til den aspUPLOAD, men får følgende fejl:
\"Der opstod en intern http 500-server fejl\"
Er der en der kan se fejlen?
Filnavn: upload_pic.asp...
<%
Function ShowPath()
sti = Replace(Request.ServerVariables(\"PATH_INFO\"), \"html/\", \"\")
strCut = instrrev(sti, \"/\")
ShowPath = Left(sti, strCut)
End Function
If request(\"id\") = \"\" Then
tempConn = \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"../data/auto.mdb\")
Set rs = Server.CreateObject(\"ADODB.RecordSet\")
strSQL = \"SELECT TOP 1 ID FROM auto ORDER BY ID DESC\"
rs.Open strSQL, tempConn, 1, 3
intID = rs(\"ID\")
rs.close
set rs = nothing
Else
intID = request(\"id\")
End If
\' Variables
\' *********
Dim Upload
Dim file
Dim intCount
intCount=0
\' Object creation
\' ***************
Set Upload = Server.CreateObject(\"Persits.Upload.1\")
\' Only allow txt or htm files
\' ***************************
Upload.ImageType = \"jpg,jpeg,gif\"
\' Only allow files smaller than 102400 bytes
\' *****************************************
Upload.SetMaxSize = 1572864
\' Upload
\' ******
\' Upload.save
\' Select each file
\' ****************
For each file In Upload.Files
\' Only if the file exist
\' **********************
If not file.IsMissing Then
\' Save the files with his original names in a virtual path of the web server
\' ****************************************************************************
Upload.save(ShowPath()&\"images/autopic/\" & intID & \".\" & file.FileExt)
End If
Next
response.redirect \"../admin.asp?page=message&message=Bilen er nu tilføjet til databasen<br>Billedet er uploadet\"
%>
