mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 09:38:54 +00:00
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:
@@ -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,',
|
||||
|
||||
Reference in New Issue
Block a user