feat(trips): download chosen Unsplash covers into uploads (#1277)

Previously a selected Unsplash photo was stored as a remote
images.unsplash.com hot-link, so covers broke offline and on link
rot. The trip PUT handler now fetches the picked image through the
SSRF guard and saves it under uploads/covers, rewriting cover_image
to the local path (502 if the download fails). Also debounces the
cover search so a slow earlier request can no longer overwrite newer
results, drops a dead userId parameter, and reverts an unrelated
vite proxy change.
This commit is contained in:
Maurice
2026-06-28 20:06:34 +02:00
committed by Maurice
parent af90ba0911
commit f24d44b4a3
7 changed files with 89 additions and 20 deletions
+7
View File
@@ -89,6 +89,13 @@ const dashboard: TranslationStrings = {
'dashboard.coverSaved': 'Omslagsbild sparad',
'dashboard.coverUploadError': 'Det gick inte att ladda upp',
'dashboard.coverRemoveError': 'Det gick inte att ta bort',
'dashboard.coverSaveError': 'Det gick inte att spara omslagsbilden',
'dashboard.searchUnsplash': 'Sök på Unsplash',
'dashboard.unsplashSearchPlaceholder': 'Sök efter resmålsbilder',
'dashboard.unsplashQueryRequired': 'Ange en sökterm',
'dashboard.unsplashNoResults': 'Inga bilder hittades',
'dashboard.coverSearchError': 'Det gick inte att söka på Unsplash',
'dashboard.useUnsplashPhoto': 'Använd Unsplash-foto av {photographer}',
'dashboard.titleRequired': 'Titel är obligatoriskt',
'dashboard.endDateError': 'Slutdatumet måste ligga efter startdatumet',
'dashboard.greeting.morning': 'God morgon,',