Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format files #141

Merged
merged 4 commits into from
Feb 16, 2025
Merged

style: format files #141

merged 4 commits into from
Feb 16, 2025

Conversation

JacobLinCool
Copy link
Member

Add GCP support for object storage.

  • GCP Client Initialization: Initialize GCP client using @google-cloud/storage in src/lib/server/object-storage.ts.
  • GCP Upload Function: Create upload_object_gcp function to handle GCP object uploads in src/lib/server/object-storage.ts.
  • Conditional Upload: Update upload_object function to conditionally use GCP or Cloudflare R2 based on configuration in src/lib/server/object-storage.ts.
  • API Route Update: Update POST handler in src/routes/api/stt/+server.ts to use upload_object_gcp if GCP is configured.
  • Environment Variables: Add GCP-related environment variables (GCP_PROJECT_ID, GCP_BUCKET_NAME, GCP_KEY_FILENAME) to .env.example.

For more details, open the Copilot Workspace session.

@Copilot Copilot bot review requested due to automatic review settings February 15, 2025 19:22

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • .env.example: Language not supported
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/lib/server/object-storage.ts:84

  • The error message 'Invalid file type' is unclear. It should be more descriptive, such as 'Unsupported file type provided for upload'.
throw new Error('Invalid file type');
@ryanlinjui ryanlinjui merged commit 029287e into main Feb 16, 2025
4 checks passed
@ryanlinjui ryanlinjui deleted the add-gcp-support-1f1 branch February 16, 2025 16:59
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