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

Add GCP support for object storage #140

Closed
wants to merge 2 commits into from

Conversation

JacobLinCool
Copy link
Member

@JacobLinCool JacobLinCool commented Feb 15, 2025

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.

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](https://copilot-workspace.githubnext.com/hinagiku-dev/Hinagiku?shareId=XXXX-XXXX-XXXX-XXXX).
@Copilot Copilot bot review requested due to automatic review settings February 15, 2025 19:03

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .env.example: Language not supported
@JacobLinCool JacobLinCool deleted the JacobLinCool/add-gcp-support branch February 20, 2025 02:43
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