| | |
| | | java110Properties.getFtpPort(), java110Properties.getFtpUserName(), |
| | | java110Properties.getFtpUserPassword()); |
| | | try { |
| | | OutputStream out = new FileOutputStream(new File("/home/hc/img/"+ UUID.randomUUID().toString()+".jpg")); |
| | | File file = new File("/home/hc/img/"+ UUID.randomUUID().toString()+".jpg"); |
| | | File fileParent = file.getParentFile(); |
| | | if (!fileParent.exists()) { |
| | | fileParent.mkdirs();// 能创建多级目录 |
| | | } |
| | | if(!file.exists()){ |
| | | file.createNewFile(); |
| | | } |
| | | OutputStream out = new FileOutputStream(file); |
| | | out.write(fileImg); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |