mercredi 12 juin 2019

How to get a file from a URL blob and throw it in the DB?

I'm developing a WEB system in Java, Servlet and JSP, and I have a specific need to save a user image upload in the database (saving only the path of the image does not resolve).

I used an input type = "file" and a hidden field and I was able to get the blob Url from the image.

"blob: http: // localhost: 8080 / 57f46201-5f38-4190-9e1f-77f726621ab4"

I'm using PostGres and I have an oid field in the table, where I want to save the image.

My question is how through this blob url turn the image into a blob so I can save it in DB.




Aucun commentaire:

Enregistrer un commentaire