Actually, that code was designed to take images from the
struts file upload feature and then save the byte array to a database managed by cmp
ejb's. I use the following to upload a file from a user's local disk to the server ( this is not complete code). The struts FormFile class has a a call to get the byte array containing the file data. You just the pass the byte array to the code I previously posted and it works just fine.
org.apache.struts.upload.FormFile myFile;
byte[] myArray = myFile.getFileData();
Hope this helps,
Ed