I am using springboot 2.7.1 and uploading the Multipart file .
our application deals with huge number of files . i am reading the multipart file using byte[] = file.getBytes()
I could see lot of files are storing in the system temp location (c/user/appData/local/temp) with the prefix upload_xx_xxxx
few files are deleting and few files are not deleting it is causing out of memory error
since am using byte[] to read the file there is no resource leak as per my knowledge
how to handle this situation.
I tried changing the byte[] to inputStream for reading the file but not working
any suggestion
Chethana Halappa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.