fix: Add file upload endpoint and fix frontend upload path
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user