FEAT : upload en local /opt/photo-app/uploads + visualisation photo

This commit is contained in:
2025-12-01 21:00:43 +01:00
parent b4889e7ec9
commit e2c714185b
12 changed files with 98 additions and 11 deletions

View File

@@ -6,6 +6,7 @@
<body>
<h1>Bienvenue sur FotoSharing<span th:if="${prenom}" th:text="' : ' + ${prenom}"></span></h1>
<p><a th:href="@{/upload}">Uploader une photo</a></p>
<p><a th:href="@{/mes-photos}">Voir mes photos</a></p>
<p>
<form th:action="@{/logout}" method="post" style="display: inline;">
<button type="submit"

View File

@@ -0,0 +1,26 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<title>Mes photos</title>
</head>
<body>
<h1>Mes photos</h1>
<p><a th:href="@{/upload}">Uploader une photo</a></p>
<p><a th:href="@{/}">Retour accueil</a></p>
<div th:if="${#lists.isEmpty(photos)}">
<p>Vous n'avez pas encore de photos.</p>
</div>
<ul th:if="${!#lists.isEmpty(photos)}">
<li th:each="p : ${photos}">
<span th:text="${p.nomFichierOriginal}">Nom du fichier</span>
<a th:href="@{'/photo/' + ${p.id} + '/raw'}" target="_blank">Voir</a>
</li>
</ul>
</body>
</html>