A simple web application to manage multiple Google Drive accounts, browse files, and view storage usage. Built with HTML, CSS, and JavaScript using the Google Drive API.
- Add Multiple Google Accounts: Sign in with multiple Google accounts and manage them in one place.
- Browse Files and Folders: View files and folders in your Google Drive with a hierarchical structure.
- Storage Usage: Visualize storage usage with a progress bar.
- Local Storage: Save account data locally for quick access.
- Drag-and-Drop Upload: Upload files to Google Drive using drag-and-drop (optional).
Before running the project, ensure you have the following:
-
Google Cloud Project:
- Create a project in the Google Cloud Console.
- Enable the Google Drive API and Google OAuth 2.0 API.
- Create OAuth 2.0 credentials (Client ID and Client Secret).
-
Node.js:
- Install Node.js to run a local server.
-
Git:
- Install Git to clone the repository.
git clone https://github.com/tejazmali/Multi-Drive.git
cd Multi-Drive
- Go to the Google Cloud Console.
- Navigate to APIs & Services β Credentials.
- Create an OAuth 2.0 Client ID.
- Add
http://localhost:3000
to Authorized JavaScript origins and Authorized redirect URIs. - Download the
credentials.json
file and rename it tocredentials.js
. - Update
credentials.js
with your Client ID and API Key:
// credentials.js
export const CLIENT_ID = 'your-client-id.apps.googleusercontent.com';
export const API_KEY = 'your-api-key';
- Add
credentials.js
to Multi-Drive Folder:
Install the required dependencies to run a local server:
npm install -g serve
Start the local server:
serve
Open your browser and navigate to:
http://localhost:3000
-
Add Google Account:
- Click the Add Google Account button.
- Sign in with your Google account and grant the required permissions.
-
Browse Files:
- Click the Browse button on an account card to view files and folders.
- Expand folders to view their contents.
-
Disconnect Account:
- Click the Disconnect button to remove an account.
- Add your email as a Test User in the Google Cloud Console under OAuth consent screen.
- Ensure the Authorized JavaScript origins and Authorized redirect URIs in the Google Cloud Console match
http://localhost:3000
.
- Use a local server (e.g.,
serve
) instead of opening the files directly (file://
protocol).
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
Enjoy managing your Google Drive accounts locally! π