Convert FormFile to Java.io.File
11,365
Here, I found something you might use:
http://www.coderanch.com/t/54902/Struts/Struts-FormFile-java-io-File
Author by
Alessandro Vasi
Updated on June 04, 2022Comments
-
Alessandro Vasi almost 2 years
I have an object
FormFile
recovered through a Struts Form . I have to convertJava
side in thejava.io.File
How can I do? The casting in this way by exception:File myFile = (File) fileFormFile
-
sp00m about 11 yearsYou're probably not the first one who's looking for that job. Have you search online before asking?
-
SJuan76 about 11 yearsA
java.IO.File
is little more than the path to a file and some utility methods. If you want to save an object to disk, you will needFileOutputStream
and similar classes.
-