Subversion Repositories SmartDukaan

Rev

Rev 6848 | Rev 6875 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6848 Rev 6853
Line 50... Line 50...
50
            if (StringUtils.isNotEmpty(userImageFileName)) {
50
            if (StringUtils.isNotEmpty(userImageFileName)) {
51
            File fileToCreate = new File(filePath, this.userImageFileName); 
51
            File fileToCreate = new File(filePath, this.userImageFileName); 
52
            FileUtils.copyFile(this.userImage, fileToCreate);
52
            FileUtils.copyFile(this.userImage, fileToCreate);
53
            try {
53
            try {
54
                ScpService scp = new ScpService();
54
                ScpService scp = new ScpService();
55
                scp.scpFile("/root/"+imageName, filePath+"/"+imageName);
55
                scp.scpFile("/var/lib/tomcat6/webapps/ROOT/images/banners/"+imageName, filePath+"/"+imageName);
56
                } catch (Exception e) {
56
                } catch (Exception e) {
57
                	addActionError("Image Failed To Upload");
57
                	addActionError("Image Failed To Upload");
58
                	return "redirect";
58
                	return "redirect";
59
                }
59
                }
60
            }
60
            }