I need to put the file inside a database, hence I use the FileItem.get() or FileItem.getOutputStream() method to retrieve the binary content and put it in a blob field.
The problem is that with some files, both get() and getOutputStream(), the bytes I get represent blank objects of the file type I'm uploading.
There is no error, just wrong bytes.
It worked with .txt, .mp3 and some .pdf. Till now, no Microsoft Office document has been uploaded.
I thought in some kind of trouble with the program version in witch the file was produced, what should explain why some .pdf are being correctly 'geted' and some not, but didn't tested it yet, because it didn't make sens to me.
I post here because the problem is not the DB but the get() or getOutputStream() methods, at least from my point of view.