I have a jsp page with a form. In the form I have an input of type file, and the user is able to upload an image.
when validating the form, I have a controller that should inserts the image in the database as BLOB, but I couldn't do it.
I tried getting it using:
@RequestParam byte[] img
and then:
Blob imgB = new javax.sql.rowset.serial.SerialBlob(imgb);
but it didn't work.
I tried also:
@RequestParam File img
but I've got an error message saying I can't get it as File.
Thanks in advance