Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | import com.kidgrow.filecenter.model.FileInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Map; |
| | | |
| | |
| | | */ |
| | | ResultBody baseDownLoad(Map<String, Object> map) throws Exception; |
| | | |
| | | FileInfo byteUplaod(String fileName, InputStream inputStream, int size); |
| | | FileInfo byteUplaod(String fileName, InputStream inputStream, int size) throws IOException; |
| | | /** |
| | | * 文件上传 根据fileType选择上传方式 hospitalId departmentId |
| | | * @param file |
| | |
| | | } |
| | | |
| | | @Override |
| | | public FileInfo byteUplaod(String fileName, InputStream inputStream,int size) { |
| | | public FileInfo byteUplaod(String fileName, InputStream inputStream,int size) throws IOException { |
| | | String houzhui=fileName.substring(fileName.lastIndexOf(".")+1); |
| | | String newFileName= RandomValueUtils.uuid()+"."+houzhui; |
| | | FileInfo newfileInfo=new FileInfo(); |
| | |
| | | newfileInfo.setSource("aliyun"); |
| | | newfileInfo.setImgType(houzhui); |
| | | newfileInfo.setCreateTime(new Date()); |
| | | this.fileUpLoadOss(newfileInfo,OssPathEn+"pdf/"+newFileName,inputStream); |
| | | this.fileUpLoadOss(newfileInfo,"pdf/"+newFileName,inputStream); |
| | | baseMapper.insert(newfileInfo); |
| | | inputStream.close(); |
| | | return newfileInfo; |
| | | } |
| | | |
| | |
| | | * byte[]上传 |
| | | */ |
| | | @PostMapping(value="byteUplaod") |
| | | public FileInfo byteUplaod(@RequestParam("fileName") String fileName,@RequestBody byte[] bytes){ |
| | | public FileInfo byteUplaod(@RequestParam("fileName") String fileName,@RequestBody byte[] bytes) throws IOException{ |
| | | if(bytes.length == 0){ |
| | | return null; |
| | | } |
| | |
| | | security: |
| | | code: |
| | | # 忽略验证码的应用编号 |
| | | ignoreClientCode: app,hospital,webApp,readxapp |
| | | ignoreClientCode: app,hospital,readxapp |
| | | |
| | | encrypt: |
| | | key-store: |