'每次上传文件个数上限
Upload.InceptFileType = "gif,jpg,png,rar,zip,psd" '设置上传文件限制
Upload.RName = ""
Upload.ChkSessionName = "UploadCode"
Upload.PreviewType = 1 '设置预览图片组件类型
Upload.InceptFileType = "gif,jpg,png,rar,zip,psd" '设置上传文件限制
Upload.RName = ""
Upload.ChkSessionName = "UploadCode"
Upload.PreviewType = 1 '设置预览图片组件类型
Upload.PreviewImageWidth = 130 '设置预览图片宽度
Upload.PreviewImageHeight = 100 '设置预览图片高度
Upload.DrawImageWidth = 114 '设置水印图片或文字区域宽度
Upload.DrawImageHeight = 36 '设置水印图片或文字区域高度
Upload.DrawGraph = 0.7 '设置水印透明度
Upload.DrawFontColor = "#FF0000" '设置水印文字颜色
Upload.DrawFontFamily = "Andale Mono" '设置水印文字字体格式
Upload.DrawFontSize = 10 '设置水印文字字体大小
Upload.DrawFontBold = 1 '设置水印文字是否粗体
Upload.DrawInfo = "a.jpg" '设置水印文字信息或图片信息
Upload.DrawType = 2 '0=不加载水印 ,1=加载水印文字,2=加载水印图片
Upload.DrawXYType = 4 '"0" =左上,"1"=左下,"2"=居中,"3"=右上,"4"=右下
Upload.DrawSizeType = 1 '"0"=固定缩小,"1"=等比例缩小
Upload.TransitionColor = "#FFFFFF" '透明度颜色设置
'执行上传
Upload.SaveUpFile
If Upload.ErrCodes<>0 Then
Response.write "错误:"& Upload.Description & "[ <a href='upload.asp'>重新上传</a> ]"
Exit Sub
End If
If Upload.Count > 0 Then
For Each FormName In Upload.UploadFiles
Set File = Upload.UploadFiles(FormName)
F_FileName = FilePath & File.FileName
'创建预览及水印图片
If Upload.PreviewType<>999 and File.FileType=1 then
F_Viewname = FilePath&"pre" & Replace(File.FileName,File.FileExt,"") & "jpg"
'创建预览图片:Call CreateView(原始文件的路径,预览文件名及路径,原文件后缀)
Upload.CreateView F_FileName,F_Viewname,File.FileExt
End If
%><!-- <script>parent.myForm.Img.value+='<%=F_FileName%>'</script> --><%
Response.Write "文件地址:<a href="& F_FileName &">上传成功</a>![ <a href=upload.asp>再次上传</a> ]<font color=red>注意:请将此地址粘贴到下面图片地址框即可</font>"
Set File = Nothing
Next
Else
Response.write "请正确选择要上传的文件。[ <a href='upload.asp'>重新上传</a> ]"
Exit Sub
End If
Set Upload = Nothing
End Sub
%>