|
@@ -66,16 +66,22 @@ public class CameraCaptureService {
|
|
|
byteArrayOutputStream.write(bytes,0,index);
|
|
|
}
|
|
|
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
|
|
|
+ String uploadUrl = "/data/test_picture/"+ IdUtils.fastSimpleUUID()+".jpeg";
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("生成至服务器本地开始,路径为======" + uploadUrl);
|
|
|
+ }
|
|
|
+ IOUtils.copy(byteArrayInputStream, new FileOutputStream(uploadUrl));
|
|
|
+ if (log.isDebugEnabled()) {
|
|
|
+ log.debug("生成至服务器本地结束,路径为======");
|
|
|
+ }
|
|
|
+ byteArrayInputStream.reset();
|
|
|
if (log.isDebugEnabled()) {
|
|
|
log.debug("getCapture======" + fileName);
|
|
|
}
|
|
|
minioUtils.minIoClientUpload(byteArrayInputStream, fileName);
|
|
|
if (log.isDebugEnabled()) {
|
|
|
- log.debug("fileName"+fileName+"图片结束截图时间"+new Date());
|
|
|
+ log.debug("fileName:"+fileName+"图片结束截图时间:"+new Date());
|
|
|
}
|
|
|
- String uploadUrl = "/data/test_picture/"+ IdUtils.fastSimpleUUID()+".jpeg";
|
|
|
- byteArrayInputStream.reset();
|
|
|
- IOUtils.copy(byteArrayInputStream, new FileOutputStream(uploadUrl));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
//先关闭外层的缓冲流,再关闭内层的流,但是在关闭外层流的同时,
|