When i try to run this code:
FileUtils.copyInputStreamToFile(file.getContent(), new File("upload/" + file.getName()));
I get this error:
error: cannot find symbol
symbol: method getName()
location: variable file of type UploadedFile
I have already imported these:
import java.io.*;
import org.apache.commons.io.FileUtils;
I'm working with Gradle and I have already added to the dependencies in build.gradle.kts this one:
implementation(group= "commons-io", name= "commons-io", version= "2.5")
so the build.gradle.kts file builds correctly.
What else should I import? What am I missing?