upload_process.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:1k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page import="java.util.*" %>
  2. <%@ page import="com.vnex.intranet.util.SubPathGenerater" %>
  3. <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%>
  4. <%@ page import="com.vnex.intranet.upload.*"%>
  5. <%@ page import="com.vnex.intranet.archives.value.ArchiveAttachmentValueBean" %>
  6. <jsp:useBean id="mySmartUpload" scope="request" class="com.vnex.intranet.upload.SmartUpload" />
  7. <%       
  8.        String root = ConfigParaLoader.getParameter("rootUrl");
  9.    if( request.getParameter("type") !=null && request.getParameter("type").equals("1")) //上传文件
  10.        {         
  11.            String attachURL = ConfigParaLoader.getParameter("documentAttachmentUrl");
  12.            attachURL += SubPathGenerater.getSeperator() + SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
  13.            mySmartUpload.initialize( pageContext );
  14.        mySmartUpload.setTotalMaxFileSize( ConfigParaLoader.getParameterByInt("attachmentSize"));
  15.            
  16.        mySmartUpload.upload();
  17.        mySmartUpload.save( root + SubPathGenerater.getSeperator() + attachURL  );
  18.   }
  19.   
  20. %>
  21. <jsp:forward page="/vnex/intranet/archives/upload_file.jsp" />