Commit 5f187951 authored by Lê Bảo Hồng Đức's avatar Lê Bảo Hồng Đức

fix: rich-text-editor upload endpoint 404

The Jodit uploader was posting to /files but the backend route is
/api/v1.0/file/upload (auto-mounted from controllers/api/v1.0/file/
upload.ts). This caused a 404 when uploading images from the editor.

Generated with [Devin](https://devin.ai)
Co-Authored-By: 's avatarDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent d75b3139
...@@ -325,7 +325,7 @@ export function AdminRichTextEditor({ ...@@ -325,7 +325,7 @@ export function AdminRichTextEditor({
language: "vi", language: "vi",
toolbarButtonSize: "middle", toolbarButtonSize: "middle",
uploader: { uploader: {
url: `${links.apiEndpoint}/files`, url: `${links.apiEndpoint}/api/v1.0/file/upload`,
method: "POST", method: "POST",
headers: { headers: {
...(accessToken ? { Authorization: `Bearer ${accessToken}` } : {}), ...(accessToken ? { Authorization: `Bearer ${accessToken}` } : {}),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment