【发布时间】:2021-06-01 08:26:41
【问题描述】:
我将存储在 S3 中的图像 URL 列表传递给我的 HTML 页面以显示。但是,图像没有显示出来。下面是我的 HTML 文件。 p 标签正确显示网址。
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Display S3 Images</title>
</head>
<body>
<div th:each=" url: ${imageURL}">
<p th:text="${url}"></p>
<img src="${url}" width="300" height="300">
</div>
</body>
</html>
P.S 当我对每个 URL 进行硬编码时,图像会显示出来,但显然我不希望这样。任何帮助表示赞赏。
【问题讨论】:
标签: html amazon-web-services spring-boot amazon-s3 thymeleaf