Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—‚οΈ Google Cloud Storage File Manager

A powerful web-based GUI application for managing files in Google Cloud Storage buckets with advanced analytics, bulk operations, and professional file management capabilities.

🌟 Why Use This App?

Professional File Management

  • Visual Interface: Modern web-based GUI instead of command-line tools
  • Bulk Operations: Upload/download hundreds of files at once
  • Advanced Analytics: Charts, statistics, and file type analysis
  • Folder Management: Create, rename, and organize folders easily

Perfect For:

  • πŸ“Έ Photographers - Manage large photo collections
  • πŸŽ₯ Content Creators - Organize video and media files
  • πŸ’Ό Businesses - Handle document storage and sharing
  • πŸ‘¨β€πŸ’» Developers - Manage project files and assets
  • 🏒 Teams - Collaborative file management

Key Advantages:

  • βœ… No coding required - Point and click interface
  • βœ… Real-time progress - See upload/download progress
  • βœ… Smart file detection - Automatically categorizes 100+ file types
  • βœ… Secure sharing - Generate time-limited download links
  • βœ… Advanced search - Find files by name, size, date, or type
  • βœ… Export capabilities - Download file lists and metadata

πŸ“‹ Prerequisites

  • Python 3.7 or higher
  • Google Cloud Platform account
  • Google Cloud Storage bucket
  • Service account with Storage permissions

πŸš€ Quick Setup (5 Minutes)

Option 1: Automated Setup

# 1. Download the project
git clone git@github.com:code-abdulrehman/GSFM-streamlit.git
cd GSFM-streamlit

# 2. Run the setup script
chmod +x setup.sh
./setup.sh

# 3. Create your .env file (see below)
# 4. Run the app
source venv/bin/activate
streamlit run main-gui.py

Option 2: Manual Setup

# 1. Create virtual environment
python3 -m venv venv
source venv/bin/activate  # Linux/Mac
# venv\Scripts\activate   # Windows

# 2. Install dependencies
pip install -r requirements.txt

# 3. Create .env file (see below)
# 4. Run the app
streamlit run main-gui.py

Required Packages (Auto-installed):

  • streamlit==1.29.0 - Web GUI framework
  • google-cloud-storage==2.10.0 - Google Cloud integration
  • pandas==2.1.3 - Data processing
  • plotly==5.17.0 - Interactive charts
  • Pillow==10.1.0 - Image processing

πŸ”‘ Google Cloud Configuration

Step 1: Get Google Cloud Credentials

  1. Go to Google Cloud Console
  2. Navigate to IAM & Admin β†’ Service Accounts
  3. Create a new service account or use existing one
  4. Download the JSON key file
  5. Encode it to base64:
base64 -i your-service-account.json

Step 2: Create .env File

Create a .env file in the project root:

# Google Cloud Storage Configuration
GOOGLE_APPLICATION_CREDENTIALS_JSON_BASE64=your_base64_encoded_service_account_json_here
PHOTO_STORAGE_BUCKET=your-bucket-name
PUBLIC_BUCKET=your-public-bucket-name

Example:

GOOGLE_APPLICATION_CREDENTIALS_JSON_BASE64=eyJ***************NvdW50Iiwi...
PHOTO_STORAGE_BUCKET=my-photos-bucket
PUBLIC_BUCKET=my-public-bucket

Step 3: Required Permissions

Your service account needs these IAM roles:

  • Storage Object Viewer - Read files
  • Storage Object Admin - Upload/delete files
  • Storage Legacy Bucket Reader - Bucket information

🎯 How to Use the App

Start the Application

# Activate virtual environment
source venv/bin/activate  # Linux/Mac
# venv\Scripts\activate   # Windows

# Run the GUI application
streamlit run main-gui.py

Access the Web Interface

  • Local URL: http://localhost:8501
  • Network URL: http://your-ip:8501 (accessible from other devices)

πŸ“± App Features Overview

🏠 Main Dashboard

  • Bucket Analytics - File counts, sizes, and statistics
  • Interactive Charts - Visual file type distribution
  • Recent Activity - Latest uploads and modifications
  • Storage Overview - Total space usage and trends

πŸ“ File Management

  • Advanced Search - Find files by name, size, date, or type
  • Bulk Operations - Upload/download multiple files
  • Folder Management - Create, rename, and organize folders
  • File Preview - View images and videos directly in browser

πŸ“€ Upload Options

  • Single File Upload - Upload one file at a time
  • Multiple Files - Select and upload several files
  • Bulk Upload - Upload hundreds of files with progress tracking
  • Folder Selection - Choose destination folder or create new ones

πŸ“₯ Download & Export

  • Individual Downloads - Download single files
  • Bulk Downloads - Download entire folders as ZIP
  • Signed URLs - Generate secure, time-limited download links
  • Metadata Export - Export file lists as CSV/JSON

πŸ” Advanced Features

  • Smart File Detection - Automatically categorizes 100+ file types
  • Time-based Filtering - Find files by creation/modification date
  • Size-based Search - Filter by file size ranges
  • Content Type Analysis - Detailed MIME type detection

🎨 App Interface

Main Navigation

The app features a clean sidebar navigation with these sections:

  1. ℹ️ Bucket Info & Analytics - Overview and statistics
  2. πŸ“Š Dashboard - Visual charts and file management
  3. πŸ“‚ Folder Management - Organize your files
  4. πŸ“€ Advanced Upload - Upload files with options
  5. πŸ“₯ Bulk Download - Download multiple files
  6. πŸ” Advanced Search & Preview - Find and preview files
  7. πŸ”— Export Links & Metadata - Generate sharing links
  8. πŸ” Simple Search - Quick file search
  9. πŸ“‹ File Details - Detailed file information

Key Benefits Over Command Line Tools

  • πŸ–±οΈ Point & Click - No need to remember commands
  • πŸ“Š Visual Analytics - See your data in charts and graphs
  • ⚑ Bulk Operations - Handle hundreds of files at once
  • πŸ” Smart Search - Find files by multiple criteria
  • πŸ“± Web Interface - Access from any device on your network
  • 🎯 Progress Tracking - See real-time upload/download progress

🚨 Troubleshooting

Common Issues & Solutions

Problem Solution
"Authentication Error" Check your .env file has correct base64 credentials
"Bucket Not Found" Verify bucket names in .env match your Google Cloud buckets
"Permission Denied" Ensure service account has Storage Object Admin role
"Module Not Found" Run source venv/bin/activate then pip install -r requirements.txt
"Port already in use" Streamlit will automatically use the next available port (8502, 8503, etc.)

Getting Help

  • Check the terminal output for detailed error messages
  • Ensure your Google Cloud project has billing enabled
  • Verify your service account has the required permissions

πŸ“ Project Files

file_downlad_and_upload/
β”œβ”€β”€ main-gui.py               # 🌟 Main GUI application (use this!)
β”œβ”€β”€ main.py                   # Command-line version
β”œβ”€β”€ requirements.txt          # Python dependencies
β”œβ”€β”€ setup.sh                 # Automated setup script
β”œβ”€β”€ README.md                # This documentation
β”œβ”€β”€ .env                     # Your configuration (create this)
β”œβ”€β”€ .gitignore              # Git ignore rules
└── venv/                   # Virtual environment

πŸ”’ Security & Best Practices

  • βœ… Never commit .env file or credentials to version control
  • βœ… Use base64 encoding for credentials in environment variables
  • βœ… Regularly rotate service account keys
  • βœ… Use least-privilege IAM roles
  • βœ… Enable billing on your Google Cloud project

πŸŽ‰ Ready to Start?

  1. Follow the setup instructions above
  2. Create your .env file with Google Cloud credentials
  3. Run the app: streamlit run main-gui.py
  4. Open your browser to http://localhost:8501
  5. Start managing your Google Cloud Storage files!

🌟 Enjoy your new professional file management system!

About

Google Storage File Manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages