mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(file-upload): workspace/chat context not being passed in some forms (#1852)
This commit is contained in:
committed by
GitHub
parent
f62568efc7
commit
c8ea08e130
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user