Package com.scooterframework.web.controller

Examples of com.scooterframework.web.controller.UploadFile


      flash("error", CurrentThreadCacheClient.getFirstError().getMessage());
      return renderView("index");
    }

        try {
            UploadFile uf1 = pFile("file1");
            uf1.writeTo(applicationPath() + "/static/docs");
            flash("notice", "You have successfully uploaded a file.");

            setViewData("file", uf1.getFileName());
        } catch (Exception ex) {
            flash("error", "There is a problem with upload.");
        }
        return null;
    }
View Full Code Here


    String path = p("f");
    File requestFile = getFile(path);
    setViewData("requestFile", requestFile);
   
        try {
            UploadFile uf = pFile("theFile");
            uf.writeTo(appPath + "/" + path);
            flash("notice", "File was successfully uploaded.");
            return redirectTo(BuiltinHelper.FILE_BROWSER_LINK_PREFIX_DIR + path);
        } catch (Exception ex) {
      log.error("Error in doUpload() caused by " + ex.getMessage());
            flash("error", "There is a problem with upload.");
View Full Code Here

    File requestFile = getFile(path);
    setViewData("requestFile", requestFile);
   
        try {
      String parentPath = (new FileInfo(requestFile.getParentFile())).getRelativePath();
            UploadFile uf = pFile("theFile");
            uf.writeTo(requestFile);
            flash("notice", "File was successfully replaced.");
            return redirectTo(BuiltinHelper.FILE_BROWSER_LINK_PREFIX_DIR + parentPath);
        } catch (Exception ex) {
      log.error("Error in doReplace() caused by " + ex.getMessage());
        }
View Full Code Here

TOP

Related Classes of com.scooterframework.web.controller.UploadFile

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.