| | |
| | | import com.java110.common.dao.IFileServiceDao; |
| | | import com.java110.config.properties.code.Java110Properties; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.client.JSchFtpUploadTemplate; |
| | | import com.java110.core.smo.file.IFileInnerServiceSMO; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.core.client.FtpUploadTemplate; |
| | | import com.java110.utils.util.Base64Convert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Autowired |
| | | private FtpUploadTemplate ftpUploadTemplate; |
| | | |
| | | @Autowired |
| | | private JSchFtpUploadTemplate jSchFtpUploadTemplate; |
| | | |
| | | |
| | | @Override |
| | | public String saveFile(@RequestBody FileDto fileDto) { |
| | |
| | | java110Properties.getFtpPort(), java110Properties.getFtpUserName(), |
| | | java110Properties.getFtpUserPassword(), java110Properties.getFtpPath()); |
| | | |
| | | // String fileName = jSchFtpUploadTemplate.upload(fileDto.getContext(), java110Properties.getFtpServer(), |
| | | // java110Properties.getFtpPort(), java110Properties.getFtpUserName(), |
| | | // java110Properties.getFtpUserPassword(), java110Properties.getFtpPath()); |
| | | return fileName; |
| | | } |
| | | |
| | |
| | | java110Properties.getFtpPort(), java110Properties.getFtpUserName(), |
| | | java110Properties.getFtpUserPassword()); |
| | | |
| | | String context = new BASE64Encoder().encode(fileImg); |
| | | //String context = new BASE64Encoder().encode(fileImg); |
| | | String context = Base64Convert.byteToBase64(fileImg); |
| | | |
| | | fileDto.setContext(context); |
| | | fileDtos.add(fileDto); |