This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'd be more interested in FormFile's getInputStream() method than the getData() method. Once you have an Input Stream, writing to an output file is just standard Java using the java.io package.
I'd suggest you check out Java Developer's Almanac Site for some example code on how to write to files using the java.io package. Pay particular attention to the "copy One File to Another" example. Even though you're not copying from one file to another, you are copying from an input stream to an output stream.
DownloadAction is for downloads only. Not very useful for an upload. The second link refers to a class that was created specifically for use in the example application. It's useful as an example, but not for much more than that.
Since there are so many different things you can do with an uploaded file (save to disk, save as BLOB, save as CLOB, turn into a PDF, etc.) there isn't really a single class that is going to cover all the bases. You pretty much have to crank out the class and do the low level work.
Joined: May 15, 2006
Thanks Merrill !!
Joined: Jul 18, 2006
ThAnks guys!! I'm able to now upload the image files, create & delete files