title: Can we calculate checksum of the file as it is being uploaded by the user in a Spring MVC application?
body: <p>I have a Spring MVC application that is deployed in Apache Tomcat 9 Webserver. Is it possible to calculate checksum as the file is being uploaded by the user? Where should I even begin looking if I wanted to do this?</p>
  <p>To be specific, I understand that I can calculate checksum inside a <code>@Controller</code> class in Spring MVC. However, at this point in time, the file is completely uploaded to the temporary file upload directory. I am, specifically, asking if there is a way to calculate the checksum of the individual parts as a MultipartFile object is being uploaded/created. Do I have to override Apache Tomcat behaviour? Is it possible to do this without modifying Tomcat source code? If not, what is the potential impact of such a modification of Tomcat source code?</p>
  <p><em>I do not understand the intricacies of webservers and would appreciate it if someone could tell me where to start looking.</em></p>