esthera
11-17-2005, 04:56 AM
I have the following code:
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Upload.SetMaxSize 3000000, True
On Error Resume Next
path= server.mappath("admin.asp")
path=left(path,len(path)-10)
path=path & "\pictures\"
Count = Upload.Save(path)
If Err <> 0 or Count = 0 Then
if err<>0 then Response.Write "An error occurred:" & Err.Description
Else
On Error Goto 0
Set File = Upload.Files(1)
If File.ImageType = "UNKNOWN" Then
File.Delete
response.write "This is not a valid image file."
end if
fName = File.ExtractFileName'right(file.path,len(file.path) - slashLoc)
end if
I now want to add to my form a picture2 that will go to my pictures2 directory instead of pictures.
I also need to extract the second filename.
Can someone help me edit this?
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Upload.SetMaxSize 3000000, True
On Error Resume Next
path= server.mappath("admin.asp")
path=left(path,len(path)-10)
path=path & "\pictures\"
Count = Upload.Save(path)
If Err <> 0 or Count = 0 Then
if err<>0 then Response.Write "An error occurred:" & Err.Description
Else
On Error Goto 0
Set File = Upload.Files(1)
If File.ImageType = "UNKNOWN" Then
File.Delete
response.write "This is not a valid image file."
end if
fName = File.ExtractFileName'right(file.path,len(file.path) - slashLoc)
end if
I now want to add to my form a picture2 that will go to my pictures2 directory instead of pictures.
I also need to extract the second filename.
Can someone help me edit this?