Skip to content

Fix file upload to read contents for BigQuery credentials#28

Merged
acmeguy merged 1 commit intomasterfrom
fix/file-upload-read-contents
Mar 23, 2026
Merged

Fix file upload to read contents for BigQuery credentials#28
acmeguy merged 1 commit intomasterfrom
fix/file-upload-read-contents

Conversation

@acmeguy
Copy link

@acmeguy acmeguy commented Mar 23, 2026

Summary

  • BigQuery datasource creation failed with Unexpected 45 while parsing number literal because the file upload stored raw Ant Design UploadFile objects instead of reading file contents
  • Now uses FileReader.readAsText() to store the actual JSON string as the form value
  • Fixes cascading errors: missing datasource ID, null sql_credentials, failed test connection

Test plan

  • Upload a BigQuery service account JSON file in the datasource setup form
  • Verify the datasource is created successfully
  • Verify test connection works
  • Verify editing an existing datasource shows the file as attached

🤖 Generated with Claude Code

The file input (used by BigQuery keyFile upload) was storing Ant Design
UploadFile objects as the form value. These aren't JSON-serializable,
causing GraphQL "Unexpected 45 while parsing number literal" errors and
cascading failures (missing datasource ID, null sql_credentials).

Now uses FileReader.readAsText() to store the actual file contents as a
string, which is what the backend's prepareDbParams expects to JSON.parse.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit 4170faa into master Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants