RETURN DATABASE IMAGE AND SHOW ON BROWSER

0

I would like you to help me with a little doubt that I have, is it possible to save images in databases and return them to the browser but that works as if you were reading only the image? I hope you have understood me, just here I leave an example: link

    
asked by Augusto G Gustavo Esquen Espin 11.12.2018 в 18:52
source

1 answer

4

If possible, you have two options:

  • You keep the path of the image in the database and the image in a folder where you are going to upload the images, and when you want to show the images in the browser, you simply look for the path in the database eslache, the image and its format, and you show it in html ex: C: /xampp/htdocs/tuproyecto/uploads/imagen.jpg

  • you save the image in base64 string format, there you will have the same image encoded in the database, and at the time of showing, you just have to decode it.

  • I hope to have you help them, for better explanations, expose the code ....

        
    answered by 11.12.2018 в 19:09