You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look into our codebase right now, you'll see that we support Backblaze and AWS both at the same time. Also, we have only written the code for supporting AWS S3, but it works out of the box for Backblaze! (with some minor conditional changes wherever required)
Example: conditions inside useS3.tsx wherever small changes are required depending on the bucket:
Okay, so now, your job is to integrate Digital Ocean in a similar manner by making the useS3 hook compatible with it.
First, create a new file inside pages/new/ directory which will be used to get the credentials for that provider. (refer other files to get an idea)
Then, make changes in the useS3 hook wherever required. Explore how we've integrated Backblaze and try to follow it.
Navigate to util/globals.ts and add an object for your provider to the PROVIDERS array. (Also add a logo for the provider in the public/ directory)
Navigate to util/types.ts and add your provider's name to the Provider enum.
Finally, navigate to the useBucket hook and add a case for your provider and return that hook.
Also make sure to edit any provider-specific functions to make them work with your provider. (look for switch cases or if/else statements that check for the type of provider).
For CodeDay Labs
Digital Ocean is yet another object storage platform that would be a very good integration to have in our app. The good part is that Digital Ocean fully supports the AWS S3 API, So we don't need to reinvent the wheel again!
If you look into our codebase right now, you'll see that we support Backblaze and AWS both at the same time. Also, we have only written the code for supporting AWS S3, but it works out of the box for Backblaze! (with some minor conditional changes wherever required)
![image](https://user-images.githubusercontent.com/36627266/236668252-f37287bb-bf11-4620-aa48-33bab192599e.png)
Example: conditions inside
![image](https://user-images.githubusercontent.com/36627266/236668311-7f2302ad-39ca-4a0b-8e9b-26cdf79dae6c.png)
useS3.tsx
wherever small changes are required depending on the bucket:Okay, so now, your job is to integrate Digital Ocean in a similar manner by making the
useS3
hook compatible with it.pages/new/
directory which will be used to get the credentials for that provider. (refer other files to get an idea)useS3
hook wherever required. Explore how we've integrated Backblaze and try to follow it.util/globals.ts
and add an object for your provider to thePROVIDERS
array. (Also add a logo for the provider in thepublic/
directory)util/types.ts
and add your provider's name to theProvider
enum.useBucket
hook and add a case for your provider and return that hook.Refer to CONTRIBUTING.md for further guide: https://github.com/faisalsayed10/firefiles/blob/main/docs/CONTRIBUTING.md#testing
The text was updated successfully, but these errors were encountered: