0

I am trying to compare a Multipart file which is being uploaded by a user to a current file in a directory. So, if the two files have the same name, I check to see if files are equal.

I have tried using :

FileUtils.contentEquals(fileMultipart, file2);

The issue is that I cannot compare Multipart file to a file. How do I go about converting the multipart file?

james899
  • 1
  • 1
  • 1
    First convert Multipart file into File then compare. – Omore Apr 04 '17 at 19:47
  • Possible duplicate of [How to convert a multipart file to File?](http://stackoverflow.com/questions/24339990/how-to-convert-a-multipart-file-to-file) – Jack Flamp Apr 04 '17 at 20:08

0 Answers0