LibreChat/client
Bastian Seipp 4f7992917b
fix: correct file_id extraction in markdown file download links
The markdown link handler was incorrectly extracting file_id and filename
from URLs in the format files/{userId}/{file_id}. The .pop() method was
applied twice in reverse order, causing the userId to be assigned to the
file_id variable and the actual file_id to be used as filename.

This caused downloads to fail with 404 errors as the API was called with
/api/files/download/{userId}/{userId} instead of the correct
/api/files/download/{userId}/{file_id}.

Fixed by directly accessing parts[2] to get the file_id and using the
link text (children) as the filename. Also added children to the useMemo
dependency array to properly track changes.
2025-11-14 13:37:33 -05:00
..
public 🌉 feat: Integrate Helicone AI Gateway Provider (#10287) 2025-11-13 08:45:32 -05:00
scripts 🔧 refactor: Build Process and Static Asset Handling (#7605) 2025-05-28 11:48:04 -04:00
src fix: correct file_id extraction in markdown file download links 2025-11-14 13:37:33 -05:00
test 🔐 feat: Granular Role-based Permissions + Entra ID Group Discovery (#7804) 2025-08-13 16:24:17 -04:00
babel.config.cjs chore: Remove Unused Dependencies 🧹 (#939) 2023-09-14 15:12:22 -04:00
check_updates.sh 🔧 fix: Resolve Proper Dependencies to fix Application Error (#2488) 2024-04-22 12:52:30 -04:00
index.html 🌐 feat: Add support to SubDirectory hosting (#9155) 2025-08-27 02:00:18 -04:00
jest.config.cjs v0.8.1-rc1 (#10316) 2025-10-30 16:36:54 -04:00
nginx.conf 🚅 chore: Added an Example of Nginx gzip Settings (#3173) 2024-06-23 13:49:00 -04:00
package.json feat: Artifact Management Enhancements, Version Control, and UI Refinements (#10318) 2025-11-12 13:32:47 -05:00
postcss.config.cjs refactor: Settings/Presets UI Restructure, convert many files to TS (#740) 2023-08-04 13:56:44 -04:00
tailwind.config.cjs 🖼️ style: Improve Marketplace & Sharing Dialog UI 2025-08-13 16:24:24 -04:00
tsconfig.json 🖼️ style: Improve Marketplace & Sharing Dialog UI 2025-08-13 16:24:24 -04:00
vite.config.ts 🌐 feat: Configurable Domain and Port for Vite Dev Server (#10180) 2025-10-22 22:04:49 +02:00