Files
FrankandClaude Sonnet 5 ed9390319b Add Art section: upload named images, gallery, delete
- Artwork entity (name, stored filename, original name, mime, size, date)
- /art gallery grid; /art/upload (name + image file, PNG/JPEG/GIF/WebP,
  20M cap); /art/{id}/file streams the image behind auth; /art/{id}/delete
  (CSRF) removes row + file
- files stored under var/uploads/art/ (git-ignored, on the php_var volume
  in Docker), served through a controller so they stay login-gated
- "Art" nav item

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 16:41:33 +02:00

24 lines
810 B
Twig

{% extends 'base.html.twig' %}
{% block title %}Upload art · dmtools{% endblock %}
{% block body %}
<div class="mb-3">
<a href="{{ path('app_art') }}" class="text-decoration-none small">&larr; Art</a>
<h1 class="h3 mb-0">Upload art</h1>
</div>
<div class="card shadow-sm" style="max-width: 32rem;">
<div class="card-body">
{{ form_start(form, {attr: {enctype: 'multipart/form-data'}}) }}
{{ form_row(form.name) }}
{{ form_row(form.file) }}
<div class="mt-3 d-flex gap-2">
<button class="btn btn-primary">Upload</button>
<a href="{{ path('app_art') }}" class="btn btn-outline-secondary">Cancel</a>
</div>
{{ form_end(form) }}
</div>
</div>
{% endblock %}