fix: Add file upload endpoint and fix frontend upload path

This commit is contained in:
empty
2026-01-07 03:17:58 +08:00
parent 49e667cc94
commit 44249889df
2 changed files with 48 additions and 3 deletions

View File

@@ -70,11 +70,12 @@ export function CharacterPanel({ storyboardId }: CharacterPanelProps) {
if (!file) return
try {
// Upload to server
// Upload to server - use quality API endpoint
const formData = new FormData()
formData.append('file', file)
const response = await fetch(`/api/upload?storyboard_id=${storyboardId}&type=character`, {
const apiBase = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000/api'
const response = await fetch(`${apiBase}/quality/upload?storyboard_id=${storyboardId}&type=character`, {
method: 'POST',
body: formData,
})