手动上传文件并解压流程图:
![image-20220708162721585](https://i-blog.csdnimg.cn/blog_migrate/97bc7cf7f68228f22a7f98ffc7d016b5.png)
对应的源码:
controller层:
![image-20220708225405039](https://i-blog.csdnimg.cn/blog_migrate/96593f67254e4d7a8b60c80184102026.png)
service层:
![image-20220708225459564](https://i-blog.csdnimg.cn/blog_migrate/b93c5dc86b4838dd0d765643ec5f8ceb.png)
serviceimpl层:
uploadFiles():
![](https://i-blog.csdnimg.cn/blog_migrate/ed8d7860b96b50c3afb173fb9c80a9c1.png)
uploadEmlFile():
![image-20220708225833855](https://i-blog.csdnimg.cn/blog_migrate/df4d38e38d0c71e8fc413e6958c3c045.png)
![image-20220708225945801](https://i-blog.csdnimg.cn/blog_migrate/f6694d8971cb107d9fe4d1a5821fc69e.png)
uploadCompressedFile():
![](https://i-blog.csdnimg.cn/blog_migrate/5e2a848164fde77f1ec8c202b289df65.png)
![image-20220708230058049](https://i-blog.csdnimg.cn/blog_migrate/3ed9942161340de5b7d946d1dce0e1ec.png)
unCompressedFile():
![image-20220708230348728](https://i-blog.csdnimg.cn/blog_migrate/44a5036bce530eb3fbea925f41295451.png)
![image-20220708230419626](https://i-blog.csdnimg.cn/blog_migrate/b2ab6278cbe276ff9420aad068976237.png)
工具类FileDecryptionUtil类:
unZip():
![image-20220708232555245](https://i-blog.csdnimg.cn/blog_migrate/bc9c43e346243f95ff535e446bfdef2d.png)
un7z():
![image-20220708230642935](https://i-blog.csdnimg.cn/blog_migrate/ff822f217f4b7e916216d9f50538bc6d.png)
unRarWithPassword():
![image-20220708230716598](https://i-blog.csdnimg.cn/blog_migrate/63a779d5086c6c010cff2a10d517ad8a.png)
![image-20220708230744080](https://i-blog.csdnimg.cn/blog_migrate/20904f7a796e09432f3db66821e17dc8.png)
对应的响应:
相应解释:对于上传解压时间过长的文件,就返回正在上传
![image-20220708225203874](https://i-blog.csdnimg.cn/blog_migrate/8831d7f511a91e37fbd3a3eae0818038.png)
END:
一个文件上传并解压的小业务,记录一下。