ABCUpload组件是一个优秀的文件上传组件,而且它还能读出上传的图片文件的长、宽、图像格式等属性。
以下代码是摘自我程序中的一个片断,借此说明其使用方法:
<%
Dim theForm,theField
Set theForm = Server.CreateObject("ABCUpload4.XForm")
theForm.Overwrite = True
Set theField = theForm.Files("Upfile")
FileName=theField.FileName
FileExtName=GetFileExtStr( FileName )
FileName=SessionID&"."&SessionVer&"."& GetTimeVal() &"."&FileExtName
Calc_FilePathURL
If theField.FileExists Then theField.Save FilePath & "\" & FileName
Dim W,H,S,T
W=theField.imageWidth
H=theField.imageHeight
S=theField.Length
T=theField.imageType
Set theForm = Nothing
%>
你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=225502