“Not allowed to load local resource: file:///C:…jpg” Java EE Tomcat

后端 未结 8 1485
忘了有多久
忘了有多久 2020-11-29 06:36

I\'m trying to retrieve a picture from my file system after a good storage,(instead of putting it in the database I copy it to the disc and i put the path to the db)

8条回答
  •  清酒与你
    2020-11-29 07:03

    Do not use ABSOLUTE PATH to refer to the name of the image for example: C:/xamp/www/Archivos/images/templatemo_image_02_opt_20160401-1244.jpg. You must use the reference to its location within webserver. For example using ../../Archivos/images/templatemo_image_02_opt_20160401-1244.jpg depending on where your process is running.

提交回复
热议问题