Jelajahi Sumber

Image List shows image

Andrew Grant 2 bulan lalu
induk
melakukan
c9581258bd
1 mengubah file dengan 6 tambahan dan 1 penghapusan
  1. 6 1
      src/main/resources/templates/images/image/list.html

+ 6 - 1
src/main/resources/templates/images/image/list.html

@@ -35,7 +35,12 @@
                 <td th:text="${image.id}">123</td>
                 <td th:text="${image.name}">123</td>
                 <td th:text="${image.fileName}">123</td>
-                <td></td>
+                <td>
+                    <div th:if="${image.imageData != null and !#strings.isEmpty(image.imageData)}">
+                        <img class='img-thumbnail' th:src="'data:image/jpeg;base64,' + ${image.imageData} "
+                             width="50" height="50" alt=""/>
+                    </div>
+                </td>
                 <td><span>
                         <a th:action="delete" class="btn btn-danger btn-sm" href=""
                            th:href="'image/' + ${image.id} + '/delete'"