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.");