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

Added Support for Wasabi and Digital Ocean #64

Merged
merged 67 commits into from Aug 19, 2023

Conversation

nghiapham1026
Copy link
Contributor

  • Added a hook for Wasabi at /apps/web/pages/new/wasabi.tsx that is based on the AWS S3 hook, including the login page and necessary functions for Wasabi.
  • Added a hook for Digital Ocean at /apps/web/pages/new/digitalocean.tsx that is based on the AWS S3 hook, including the login page and necessary functions for Digital Ocean.
  • Made changes to /apps/web/hooks/useBucket.tsx and /apps/web/hooks/useS3.tsx to reflect the addition of Wasabi and Digital Ocean as supported providers.
  • Made changes to /apps/web/util/types.ts and /apps/web/util/types.ts to include the logos and buttons for Wasabi and Digital Ocean in the main page. Created a condition that checks for the presence of only one of the RESEND_API_KEY or SENDGRID_API_KEY, which can only run if one of them is set to "undefined," to minimize conflicts.
  • Made changes to /apps/web/util/helpers/s3-helpers.ts to allow the creation of Digital Ocean and Wasabi drives and facilitate the fetching of objects to the drive.
  • Minor cosmetic changes to the web page and code readability.

nghiapham1026 and others added 30 commits July 5, 2023 22:56
Made changes to wasabiProvider.tsx, useBucket.tsx, useWasabi.tsx, glo…
Changes to Wasabi loading page
Merging updates from original branch
Added Digital Ocean integration to the API
.env and added Wasabi cases to s3-helpers
@nghiapham1026
Copy link
Contributor Author

This pull request is ready to be reviewed and merged.

apps/web/util/types.ts Show resolved Hide resolved
apps/web/util/globals.ts Show resolved Hide resolved
@@ -29,10 +29,13 @@ export const createNewBucket = async (
};

export const beforeCreatingDoc = async (req: NextApiRequest, res: NextApiResponse, body: any) => {

const { data, type } = body;

switch (type) {
case "firebase":
Copy link

Choose a reason for hiding this comment

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

@nghiapham1026 @9brian we might want to store these as global constants in the future so it can be used across different files, i.e. in one file firebase might be misspelled but here it is spelled correctly

Choose a reason for hiding this comment

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

forgot to add, but constants help prevent these inconsistencies

apps/web/util/helpers/s3-helpers.ts Show resolved Hide resolved
apps/web/hooks/useS3.tsx Show resolved Hide resolved
@faisalsayed10
Copy link
Owner

faisalsayed10 commented Aug 18, 2023

@nghiapham1026 @ConlynPattison any updates? just confirming if all the above changes are done. if so, I'll merge it

@faisalsayed10
Copy link
Owner

Also, I am getting this error, can you guys please check what's wrong?
image

@faisalsayed10
Copy link
Owner

ah I think the error is related to this: there should not be a package.json file outside the /web or the /landing directory
image

@nghiapham1026
Copy link
Contributor Author

@faisalsayed10 There was not any error in the codebase when we first made the pull request. However, the error only persists when we merged the Cloudflare change from the main branch. I think there is some merge conflict between Cloudflare and our code that is causing the error.

@faisalsayed10
Copy link
Owner

I see, even then, please check my previous comment on how package.json shouldn't exist on the root path

@nghiapham1026
Copy link
Contributor Author

I see, even then, please check my previous comment on how package.json shouldn't exist on the root path

I removed the package.json file from the root path.

Copy link
Owner

@faisalsayed10 faisalsayed10 left a comment

Choose a reason for hiding this comment

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

looks good to me

@faisalsayed10 faisalsayed10 merged commit 7452e88 into faisalsayed10:main Aug 19, 2023
3 checks passed
@faisalsayed10
Copy link
Owner

Just tested the app, and everything works perfectly. Appreciate the work, thank you so much!

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.

Add Digital Ocean integration to the app Add Wasabi Integration to the app
5 participants