chanseng1982
chanseng1982
关注数: 1
粉丝数: 0
发帖数: 155
关注贴吧数: 0
跪求高手增加下aspjpeg组件上传图片自动按比例缩小图片 <!--#include file="upload_class.asp"--> <% if request.QueryString("act")="upload" then Dim Upload,path,tempCls,fName set Upload=new AnUpLoad Upload.SingleSize=1024*1024*1024 Upload.MaxSize=1024*1024*1024 Upload.Exe="jpg|jpeg|gif|png|zip|rar|7z|pdf|doc" Upload.Charset="gb2312" Upload.openProcesser=false Upload.GetData() if Upload.ErrorID>0 then response.write Upload.Description else if Upload.files(-1).count>0 then path=server.mappath("upload") set tempCls=Upload.files("file1") tempCls.SaveToFile path,0 fName=tempCls.FileName set tempCls=nothing else response.Write "您没有上传任何文件!" end if end if set Upload=nothing %> <script type ="text/javascript"> window.parent.document.form2.photo.value='<%=fName%>'; img="<%=fName%>" img2="../upload/<%=fName%>" parent.document.all.form2.photo.value=img parent.document.all.pic.innerHTML="<img src="+img2+" height=100>" </script> <% else %> <form name="upload" method="post" action="uploadpic.asp?act=upload" enctype="multipart/form-data"> <input type ="file" name ="file1" /> <input type ="submit" value="上传" style="height:30px;" /> </form> <% end if %>
1
下一页