Hi I have discoverd how i can upload an image to an webserver folder.
Now if i upload the file it is being with this code: (UPLOAD.ASP)
<%
Option Explicit
Dim SAVEPATH
SAVEPATH = Server.MapPath("/IMAGES/uploaded/"
Dim oUpload, oFile
Dim strPath, strFile, strExt, strType
'Maak object, let op het New command ipv Server.CreateObject
Set oUpload = Server.CreateObject("Dundas.Upload.2"
oUpload.MaxUploadSize = 100000
'oUpload.UseVirtualDir = True
oUpload.UseUniqueNames = True
Set oFile = oUpload.GetNextFile()
If InStr(1,oFile.ContentType,"image"
Then
oFile.Save(SAVEPATH)
Response.Write(oFile.FileName)
End If
Set oFile = Nothing
Set oUpload = Nothing
%>
Now if i upload an image with an other form that looks like this :UPLOADFORM.ASP
<html>
<head>
<TITLE>Bestand</TITLE>
</head>
<body BGCOLOR="#cccccc">
<form METHOD="POST" ENCTYPE="multipart/form-data" ACTION="upload.asp">
Bestand: <input TYPE="FILE" NAME="bestand" ACCEPT="image/gif,image/jpeg"><br>
<input TYPE="SUBMIT" VALUE="Stuur bestand">
</form>
</body>
</html>
The filename gets a name that looks like this:
{812026AA-D69E-4676-BD18-01FDB7AD0BA0}_105535716.jpg
What i want to do is store this to somebody's recordset with the name of the picture and the ClassID.
I also need to know how i should recall the picture ...so if an user has uploaded a picture with his regestration ...he can log in again and should be able to see a picture with the userdata of the user.
Can someone help me with this ...because i am not that familier with ASP.
Thank you!
Now if i upload the file it is being with this code: (UPLOAD.ASP)
<%
Option Explicit
Dim SAVEPATH
SAVEPATH = Server.MapPath("/IMAGES/uploaded/"
Dim oUpload, oFile
Dim strPath, strFile, strExt, strType
'Maak object, let op het New command ipv Server.CreateObject
Set oUpload = Server.CreateObject("Dundas.Upload.2"
oUpload.MaxUploadSize = 100000
'oUpload.UseVirtualDir = True
oUpload.UseUniqueNames = True
Set oFile = oUpload.GetNextFile()
If InStr(1,oFile.ContentType,"image"
oFile.Save(SAVEPATH)
Response.Write(oFile.FileName)
End If
Set oFile = Nothing
Set oUpload = Nothing
%>
Now if i upload an image with an other form that looks like this :UPLOADFORM.ASP
<html>
<head>
<TITLE>Bestand</TITLE>
</head>
<body BGCOLOR="#cccccc">
<form METHOD="POST" ENCTYPE="multipart/form-data" ACTION="upload.asp">
Bestand: <input TYPE="FILE" NAME="bestand" ACCEPT="image/gif,image/jpeg"><br>
<input TYPE="SUBMIT" VALUE="Stuur bestand">
</form>
</body>
</html>
The filename gets a name that looks like this:
{812026AA-D69E-4676-BD18-01FDB7AD0BA0}_105535716.jpg
What i want to do is store this to somebody's recordset with the name of the picture and the ClassID.
I also need to know how i should recall the picture ...so if an user has uploaded a picture with his regestration ...he can log in again and should be able to see a picture with the userdata of the user.
Can someone help me with this ...because i am not that familier with ASP.
Thank you!