I am trying to write a unit test for handling a file upload controller using Spring 3. Now if I send the image over to my service method through the controller everything wo
What does this part of this log say?
log.info("found file: " +file.exists());
log.info("file size: " +file.length());
But I think the problem might be because of this:
File file = new File("//Users//test//Downloads//");
It looks like it's pointing to a directory instead of a file, so maybe that is why you are getting a NullPointerException
when you want to get the size of DiskFileItem