<!--#include file="AienUpload/UpLoad_Class.asp"-->
<%
 on error resume next
 Server.ScriptTimeout = 9999999
 Dim Upload,successful,thisFile,allFiles,upPath,path
 set Upload=new AnUpLoad
 Upload.openProcesser=true  '打开进度条显示
 Upload.SingleSize=clng(500 * 1024)*1024  '设置单个文件最大上传限制,按字节计；默认为不限制，本例为512M
 Upload.MaxSize=clng(500 * 1024)*1024 '设置最大上传限制,按字节计；默认为不限制，本例为1G
 Upload.Exe="rar|jpg|bmp|gif|iso|zip|mp3|mp4|doc|txt|png|pdf|swf|exe|rm|wma|smi|bmp|mdb|chm|hlp|avi|mpg|mpeg|midi|ppt|pps"  '设置允许上传的扩展名
 Upload.GetData()
 if Upload.ErrorID>0 then
 	upload.setApp "faild",1,0 ,Upload.description
 else
 	if Upload.files(-1).count>0 then
		dim str
		for each file in Upload.files(-1)
 	        upPath=request.querystring("path")
    		path=server.mappath(upPath)
    		set tempCls=Upload.files(file) 
            upload.setApp "saving",Upload.TotalSize,Upload.TotalSize,tempCls.FileName
    		successful=tempCls.SaveToFile(path,0)
			thisFile="{localname:'"&tempCls.LocalName&"',name:'" & tempCls.FileName & "',size:" & tempCls.Size & "}" 'exin modify 2009-12-12 增加本地文件名返回
			allFiles=allFiles & thisFile & ","
    		set tempCls=nothing
		next
		upload.setApp "saved",Upload.TotalSize,Upload.TotalSize,mid(allFiles,1,len(allFiles)-1)
    else
        upload.setApp "faild",1,0,"没有上传任何文件"
 	end if
 end if
 if err then upload.setApp "faild",1,0,err.description
 set Upload=nothing
%>
