Often Misused: File Upload in Java and JSP file
I am getting the "Often Misused: File Upload" on the below lines. Can anyone suggest the fix.
JAVA file:
**public void setAttachedFile(FormFile formFile) { // File upload error at this line** attachedFile = formFile; if (attachedFile != null) { formData.put("attachedFile", attachedFile); } else { formData.remove("attachedFile"); } }JSP file:
Select File Name ** // Getting the fortify here**
Can anyone please suggest the fix/solution