mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat: Recipe Timeline Images (#2444)
* refactored recipe image paths/service * added routes for updating/fetching timeline images * make generate * added event image upload and rendering * switched update to patch to preserve timestamp * added tests * tweaked order of requests * always reload events when opening the timeline * re-arranged elements to make them look nicer * delete files when timeline event is deleted
This commit is contained in:
parent
06962cf865
commit
dfe4942451
16 changed files with 355 additions and 92 deletions
|
@ -310,6 +310,11 @@ def media_recipes_recipe_id_images_file_name(recipe_id, file_name):
|
|||
return f"{prefix}/media/recipes/{recipe_id}/images/{file_name}"
|
||||
|
||||
|
||||
def media_recipes_recipe_id_images_timeline_timeline_event_id_file_name(recipe_id, timeline_event_id, file_name):
|
||||
"""`/api/media/recipes/{recipe_id}/images/timeline/{timeline_event_id}/{file_name}`"""
|
||||
return f"{prefix}/media/recipes/{recipe_id}/images/timeline/{timeline_event_id}/{file_name}"
|
||||
|
||||
|
||||
def media_users_user_id_file_name(user_id, file_name):
|
||||
"""`/api/media/users/{user_id}/{file_name}`"""
|
||||
return f"{prefix}/media/users/{user_id}/{file_name}"
|
||||
|
@ -395,6 +400,11 @@ def recipes_timeline_events_item_id(item_id):
|
|||
return f"{prefix}/recipes/timeline/events/{item_id}"
|
||||
|
||||
|
||||
def recipes_timeline_events_item_id_image(item_id):
|
||||
"""`/api/recipes/timeline/events/{item_id}/image`"""
|
||||
return f"{prefix}/recipes/timeline/events/{item_id}/image"
|
||||
|
||||
|
||||
def shared_recipes_item_id(item_id):
|
||||
"""`/api/shared/recipes/{item_id}`"""
|
||||
return f"{prefix}/shared/recipes/{item_id}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue