weixin_33749131 2019-12-29 18:16 采纳率: 0%
浏览 49

胸腺动态影像

I have a SpringBoot application where the user can store a profile picture, save an image in C: / imgPerfil / concatenating or user id + the original image name, for example: "2teste.jpeg", I need to show this image in front using thymeleaf how to do this? The Path is saved inside the Object used in the variable photo, it is also displayed in the data by Ajax.`

var nome; var foto; $.ajax({ url: '/getPerfil', type: 'GET', success: function (perfil) { nome = perfil[0].nome; foto = perfil[0].foto; console.log(perfil[0]); $("#nomeUsuario").text(nome); $("fotoUsuario").attr('src', foto); } });

How to display this image?`

  • 写回答

0条回答 默认 最新

    报告相同问题?