fix(file-upload): workspace/chat context not being passed in some forms (#1852)

This commit is contained in:
Vikhyath Mondreti
2025-11-07 18:23:13 -08:00
committed by GitHub
parent f62568efc7
commit c8ea08e130
3 changed files with 3 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ export function useImageUpload({
// Fallback to traditional upload through API route
const formData = new FormData()
formData.append('file', file)
formData.append('context', 'chat')
const response = await fetch('/api/files/upload', {
method: 'POST',

View File

@@ -111,6 +111,7 @@ export function ImageSelector({
// Fallback to traditional upload through API route
const formData = new FormData()
formData.append('file', file)
formData.append('context', 'chat')
const response = await fetch('/api/files/upload', {
method: 'POST',

View File

@@ -219,6 +219,7 @@ export function FileUpload({
// Create FormData for upload
const formData = new FormData()
formData.append('file', file)
formData.append('context', 'workspace')
// Add workspace ID for workspace-scoped storage
if (workspaceId) {