Hjælp behøves right now
Jeg har en form/kode til upload af billeder på min side men vil gerne have det sådan så man kan skive en kommentar /tekst til hvert billede man uploader.koden ser ud som følgende, hvad skal jeg lave om?
<HTML>
<BODY BGCOLOR=\"white\">
<H1>Upload pictures</H1>
<HR>
<%
On Error Resume Next
\' Variables
\' *********
Dim mySmartUpload
Dim file
Dim oConn
Dim oRs
Dim intCount
intCount=0
\' Object creation
\' ***************
Set mySmartUpload = Server.CreateObject(\"aspSmartUpload.SmartUpload\")
\' Only allow txt or htm files
\' ***************************
mySmartUpload.AllowedFilesList = \"jpg,Jpeg,gif,bmp\"
\' DeniedFilesList can also be used :
\' Allow all files except exe, mp3, bat and asp
\' ***************************************
\' mySmartUpload.DeniedFilesList = \"exe,mp3,bat,asp\"
\' Deny physical path
\' *******************
mySmartUpload.DenyPhysicalPath = True
\' Only allow files smaller than 50000 bytes
\' *****************************************
mySmartUpload.MaxFileSize = 900000
\' Deny upload if the total fila size is greater than 200000 bytes
\' ***************************************************************
mySmartUpload.TotalMaxFileSize = 2000000
\' Upload
\' ******
mySmartUpload.Upload
\' Connect to the DB
\' *****************
Set oConn = Server.CreateObject(\"ADODB.Connection\")
curDir = Server.MapPath(\"\\scripts\\aspSmartUpload\\Sample.mdb\")
oConn.Open \"DBQ=\"& curDir &\";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;\"
\' Open a recordset
\' ****************
strSQL = \"SELECT FILENAME,FILE FROM TFILES\"
Set oRs = Server.CreateObject(\"ADODB.recordset\")
Set oRs.ActiveConnection = oConn
oRs.Source = strSQL
oRs.LockType = 3
oRs.Open
\' Select each file
\' ****************
For each file In mySmartUpload.Files
\' Only if the file exist
\' **********************
If not file.IsMissing Then
\' Add the current file in a DB field
\' **********************************
oRs.AddNew
file.FileToField oRs.Fields(\"FILE\")
oRs(\"FILENAME\") = file.FileName
oRs.Update
intCount = intCount + 1
End If
Next
\' Trap errors
\' ***********
If Err Then
Response.Write(\"<b>Wrong selection : </b>\" & Err.description)
Else
\' Display the number of files uploaded
\' ************************************
Response.Write(intCount & \" file(s) uploaded.<BR>\")
\' Destruction
\' ***********
oRs.Close
oConn.Close
Set oRs = Nothing
Set oConn = Nothing
End If
%>
</BODY>
</HTML>
