diff --git a/frontend/src/locales/messages/en-US.json b/frontend/src/locales/messages/en-US.json index e7d407333..143a8f8ff 100644 --- a/frontend/src/locales/messages/en-US.json +++ b/frontend/src/locales/messages/en-US.json @@ -179,7 +179,8 @@ }, "new-recipe": { "bulk-add": "Bulk Add", - "error-message": "Looks like there was an error parsing the URL. Check the log and debug/last_recipe.json to see what went wrong.", + "error-title": "Looks We Couldn't Find Anything", + "error-details": "Only websites containing ld+json or microdata can be imported imported by Mealie. Most major recipe websites support this data structure. If your site cannot be imported but there is json data in the log, please submit a github issue with the URL and data.", "from-url": "Import a Recipe", "paste-in-your-recipe-data-each-line-will-be-treated-as-an-item-in-a-list": "Paste in your recipe data. Each line will be treated as an item in a list", "recipe-url": "Recipe URL", @@ -251,7 +252,6 @@ "total-time": "Total Time", "unable-to-delete-recipe": "Unable to Delete Recipe", "view-recipe": "View Recipe" - }, "search": { "and": "and", diff --git a/mealie/routes/utility_routes.py b/mealie/routes/utility_routes.py index b339f6a14..ab546209a 100644 --- a/mealie/routes/utility_routes.py +++ b/mealie/routes/utility_routes.py @@ -1,15 +1,14 @@ from pathlib import Path from typing import Optional -from fastapi import APIRouter, Depends +from fastapi import APIRouter, Depends, HTTPException, status from mealie.routes.deps import validate_file_token from starlette.responses import FileResponse -from fastapi import HTTPException, status router = APIRouter(prefix="/api/utils", tags=["Utils"], include_in_schema=True) -@router.get("/download/{token}") +@router.get("/download") async def download_file(file_path: Optional[Path] = Depends(validate_file_token)): """Uses a file token obtained by an active user to retrieve a file from the operating system."""