Use `send_file` instead of `send_from_directory` to serve files in FileAdmin
The path is already validated in `_normalize_path`. Also, `send_from_directory` abort paths with backslash, breaking FileAdmin subfolders in Windows. With `send_file`, we have a minor issue with the download URL, it has path with backslash, but `_normalize_path` fix this before download.
Showing
Please register or sign in to comment