Some checks are pending
CI / test (push) Waiting to run
- Public photo endpoint at /photos/{filename} (no auth, UUID-based filenames)
- Admin photo management page per article: upload multiple, delete, set main, drag-reorder
- "Fotos verwalten" action button on article index + detail pages
- EbayAdapter.publishListing() now includes imageUrls (main photo first, max 24)
- APP_PUBLIC_URL env var for absolute URL generation in Messenger workers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
41 lines
1.8 KiB
Markdown
41 lines
1.8 KiB
Markdown
# SuperSeller3000 — Plan 8: Artikel-Fotoverwaltung + eBay-Bildintegration
|
|
|
|
**Goal:** Fotos können für einen Artikel nachträglich verwaltet werden (hinzufügen, löschen, Hauptfoto setzen). Beim eBay-Listing werden die Fotos als `imageUrls` übergeben. Dafür gibt es einen öffentlichen (nicht auth-geschützten) Foto-Endpoint, den eBay direkt abrufen kann.
|
|
|
|
---
|
|
|
|
## Schritte
|
|
|
|
### 1. Öffentlicher Foto-Endpoint
|
|
|
|
- `PublicPhotoController` — Route `/photos/{filename}` ohne `@IsGranted`
|
|
- Dateiname ist UUID-basiert (ausreichend opak, kein HMAC-Signing nötig)
|
|
- `APP_PUBLIC_URL` env var (z. B. `https://ss3k.schaunwama.de`) für absolute URL-Generierung
|
|
|
|
### 2. Fotoverwaltungs-Seite im Admin
|
|
|
|
- `PhotoManagementController` — `/admin/articles/{id}/photos`
|
|
- Zeigt alle Fotos mit Hauptfoto-Markierung
|
|
- Aktionen: Upload (neue Fotos), Löschen, Hauptfoto setzen
|
|
- "Fotos verwalten" Button in `ArticleCrudController` (Index + Detail)
|
|
- Twig-Template im EasyAdmin-Layout
|
|
|
|
### 3. `imageUrls` in eBay-Listings
|
|
|
|
- `EbayAdapter` bekommt `$publicBaseUrl` injiziert
|
|
- `publishListing()`: Fotos des Artikels als `imageUrls` in `upsertInventoryItem` (max. 24, Hauptfoto zuerst)
|
|
|
|
---
|
|
|
|
## Dateien
|
|
|
|
```
|
|
src/Infrastructure/Http/Controller/PublicPhotoController.php ← NEU
|
|
src/Infrastructure/Http/Controller/Admin/PhotoManagementController.php ← NEU
|
|
templates/admin/photo_management.html.twig ← NEU
|
|
src/Infrastructure/Channel/Ebay/EbayAdapter.php ← imageUrls
|
|
src/Infrastructure/Http/Controller/Admin/ArticleCrudController.php ← Button
|
|
config/services.yaml ← publicBaseUrl
|
|
.env ← APP_PUBLIC_URL
|
|
translations/admin.de.yaml + admin.en.yaml ← neue Keys
|
|
```
|