recently, I was looking at an open source project and found that when I found the file upload function, I would first set up a temporary folder in the tomcat server. The whole process is divided into three steps:
1. Upload the front-end files first stored in the tomcat server temporary folder
2.tomcat server temporary folder, and upload the files to the ftp server
3. Delete files under the tomcat snack folder
question: why upload it to the temporary folder of the tomcat server first? In the backend service business method, is it impossible to read the front-end stream directly and transfer it to the ftp server without writing it to the tomcat? Isn"t it superfluous to upload the file to tomcat before deleting it?