diff --git a/apps/sim/app/api/tools/dropbox/upload/route.ts b/apps/sim/app/api/tools/dropbox/upload/route.ts index 6c707ac05..629a1dfbd 100644 --- a/apps/sim/app/api/tools/dropbox/upload/route.ts +++ b/apps/sim/app/api/tools/dropbox/upload/route.ts @@ -79,10 +79,7 @@ export async function POST(request: NextRequest) { fileBuffer = Buffer.from(validatedData.fileContent, 'base64') fileName = validatedData.fileName || 'file' } else { - return NextResponse.json( - { success: false, error: 'File or file content is required' }, - { status: 400 } - ) + return NextResponse.json({ success: false, error: 'File is required' }, { status: 400 }) } // Determine final path diff --git a/apps/sim/blocks/blocks/dropbox.ts b/apps/sim/blocks/blocks/dropbox.ts index 8bea2b7ea..e7127c118 100644 --- a/apps/sim/blocks/blocks/dropbox.ts +++ b/apps/sim/blocks/blocks/dropbox.ts @@ -318,13 +318,13 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`, } // Normalize file input for upload operation - // normalizeFileInput handles JSON stringified values from advanced mode - if (params.file) { - params.file = normalizeFileInput(params.file, { single: true }) - } - // Legacy: also check fileContent for backwards compatibility - if (params.fileContent && !params.file) { - params.fileContent = normalizeFileInput(params.fileContent, { single: true }) + // Check all possible field IDs: uploadFile (basic), fileRef (advanced), fileContent (legacy) + const normalizedFile = normalizeFileInput( + params.uploadFile || params.fileRef || params.fileContent, + { single: true } + ) + if (normalizedFile) { + params.file = normalizedFile } switch (params.operation) {