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.
RoshaniG Gopal
Ranch Hand
Joined: May 15, 2006
Posts: 180
posted
0
Thanks Merrill !!
Nina Anderson
Ranch Hand
Joined: Jul 18, 2006
Posts: 148
posted
0
ThAnks guys!! I'm able to now upload the image files, create & delete files