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>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{% 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">← 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 %}
|
||||
Reference in New Issue
Block a user