+ 2

Can anyone help me to store and retrieve a file in database with file path in java

Store in d://a. Img and retrieve from d://a. Img path come from datbase

30th Jan 2018, 9:08 AM
Ravi Jagani
Ravi Jagani - avatar
2 Answers
+ 1
You can use Blob Datatype in database to store any kind of file. For java code you will need to fetch file using filepath and den convert that file into binarystream. Send this binary stream to database using PreparedStatement. I will send you code for the same. Remain updated.!!! šŸ˜šŸ˜
31st Aug 2018, 9:55 AM
Agrawal Jay
Agrawal Jay - avatar
0
Either you can store the image file path or the total image as a blob in databases. you cannot dictate database to store and retrieve an image file from a particular path because Database systems implement their own file system.
2nd Feb 2018, 7:38 PM
Ravi Chandra Enaganti
Ravi Chandra Enaganti - avatar