A Python-based desktop application that allows you to upload folders and files to Google Drive while maintaining the folder structure and generating shareable links.
- Upload entire folder structures to Google Drive
- Maintain original folder hierarchy
- Generate shareable links for all uploaded files
- Dark theme UI
- Progress tracking for uploads
- Concurrent file uploads using thread pools
- Automatic JSON export of file links
- Python 3.7+
- PySide6
- Google Drive API credentials
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib PySide6
-
Create a Google Cloud Project:
- Go to Google Cloud Console
- Create a new project
- Enable the Google Drive API
- Configure OAuth consent screen
- Create OAuth 2.0 credentials
- Download the credentials and save as
credentials.json
in the project directory
-
Place the files:
- Ensure
script.py
andcredentials.json
are in the same directory - First run will generate
token.json
after authentication
- Ensure
-
Run the application:
python script.py
-
Using the application:
- Click "Select Folder to Upload" to choose a folder
- The application will maintain the folder structure in Google Drive
- Progress bar shows upload status
- Uploaded files will be shared with "anyone with the link" access
- Links are saved in
uploaded_links.json
after completion
The application generates uploaded_links.json
containing paths and shareable links:
{
"folder1/file1.txt": "https://drive.google.com/file/d/...",
"folder1/subfolder/file2.txt": "https://drive.google.com/file/d/..."
}
Local folder structure before upload:
MyProject/
├── docs/
│ ├── requirements.txt
│ └── api/
│ └── spec.md
├── src/
│ ├── main.py
│ └── utils/
│ └── helper.py
└── README.md
Google Drive structure after upload:
MyProject/
├── docs/
│ ├── requirements.txt
│ └── api/
│ └── spec.md
├── src/
│ ├── main.py
│ └── utils/
│ └── helper.py
└── README.md
Generated uploaded_links.json
:
{
"docs/requirements.txt": "https://drive.google.com/file/d/1ABC...",
"docs/api/spec.md": "https://drive.google.com/file/d/2DEF...",
"src/main.py": "https://drive.google.com/file/d/3GHI...",
"src/utils/helper.py": "https://drive.google.com/file/d/4JKL...",
"README.md": "https://drive.google.com/file/d/5MNO..."
}
- The application uses threading for concurrent uploads (4 workers)
- Files are automatically set to be viewable by anyone with the link
- Progress is shown both with a progress bar and status messages
- The dark theme UI provides better visibility