Package com.firefun.FileUpload

Examples of com.firefun.FileUpload.SmartUpload


     * Handles POST requests
     */
    protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
    {

        SmartUpload mySmartUpload = new SmartUpload();
        //String ccmc = request.getParameter("ccmc");
        //String contenttype = request.getParameter("contenttype");
        //String filemc = request.getParameter("filemc");
        String downid = request.getParameter("downid");
        Result rst = new Result("ffdb");
    String sql = "select * from ff_upload where fileid ='" + downid + "'";
    rst.EQuery(sql);
    String ccmc = rst.getString(0,"ccmc");
        String contenttype = rst.getString(0,"contenttype");
        String filemc = rst.getString(0,"filemc");
   
        String path = Address.getAddress().replace("WEB-INF","")+ "upload/" + ccmc;
        FileUtil util = new FileUtil();
        //System.out.println("%%%%%%%%%%"+util.uploadmodel);
        try
        {
          if(util.uploadmodel.equals("2")){
            util.download(downid, path);
          }
            // Initialization
            mySmartUpload.initialize(config,request,response);
           
            mySmartUpload.setContentDisposition(null);
            mySmartUpload.downloadFile("/upload/"+ccmc,contenttype,filemc)
        }
        catch(Exception e)
        {
          e.printStackTrace();
        }
View Full Code Here


      response.sendRedirect(url);
      System.out.println("未接收到ywid:::::::::::::文件上传部分");
    } else{
      Files files_temp = new Files();

      SmartUpload mySmartUpload = new SmartUpload();

      try {
        // Initialization
        mySmartUpload.initialize(config, request, response);

        // Upload
        mySmartUpload.upload();
        Files files = mySmartUpload.getFiles();
       
        //FileUtil fileutil = new FileUtil();
        //fileutil.upload(request, files, ywid, sslx);
        //System.out.println(files.getCount());
        //
View Full Code Here

TOP

Related Classes of com.firefun.FileUpload.SmartUpload

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.