文件上传问题
请问用以下这个代码怎么样指定上传文件格式.
<%
Function GetFileName(ByVal filepath)
If filepath <> "" Then
GetFileName = mid(filepath,InStrRev(filepath, "\")+1)
Else
GetFileName = ""
End If
End function
filepath = Request.Form("file1")
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1 ' adTypeBinary
objStream.Open
objStream.LoadFromFile filepath
objStream.SaveToFile "e:\file\"&GetFileName(filepath),2
objStream.Close
%>