User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
Hi I want to upload file in postgres database using java servlet but I am not understanding how to set prepared statement for file as we should use bytea for postgres not blob. Can you help to resolve this issue. I tried using getBytes(), BinaryStream but I am getting errors as
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
3 years ago
Hi I want to upload file in postgres database using java servlet but I am not understanding how to set prepared statement for file as we should use bytea for postgres not blob. Can you help to resolve this issue. I tried using getBytes(), BinaryStream but I am getting errors as
Below is my html code
Here is my java code