botbook/src/chapter-04-gbui/apps/drive.md
Rodrigo Rodriguez (Pragmatismo) 49eb6696ea Reorganize chapters and add admin/user views documentation
Chapter renames:
- chapter-09-api -> chapter-09-tools (LLM Tools)
- chapter-10-api -> chapter-10-rest (REST Endpoints)

New documentation:
- chapter-04-gbui/admin-user-views.md: Complete guide to User vs Admin interfaces
  - User Settings (/api/user/*): profile, security, notifications, storage
  - Admin Panel (/api/admin/*): users, groups, bots, DNS, audit
  - Permission levels: guest, user, manager, admin
  - Desktop sync considerations

Updated:
- Drive app docs with sync feature (rclone, desktop-only)
- All cross-references to renamed chapters
- SUMMARY.md with new structure and admin-user-views entry
2025-12-05 06:50:56 -03:00

8 KiB

Drive - File Management

Your cloud storage workspace

Drive Interface Screen

Overview

Drive is your personal cloud storage within General Bots Suite. Upload, organize, and share files with a familiar interface. Built with HTMX for smooth interactions and SeaweedFS for reliable object storage.


Features

Upload Files

Drag and Drop:

  1. Drag files from your computer
  2. Drop anywhere in the file area
  3. Upload progress shows automatically

Click to Upload:

  1. Click + New button
  2. Select Upload Files or Upload Folder
  3. Choose files from file picker

File Operations

Action How to Access
Open Double-click file
Download Right-click > Download
Rename Right-click > Rename
Copy Right-click > Copy
Move Right-click > Move to
Star Right-click > Star
Share Right-click > Share
Delete Right-click > Delete

View Modes

Mode Description
Grid Large thumbnails with previews
List Detailed table with columns

Navigation

  • Breadcrumb: Click any folder in the path to jump back
  • Sidebar: Quick access to My Drive, Starred, Recent, Trash
  • Search: Find files by name or content

Labels & Organization

Label Icon Use For
Work 🔵 Professional files
Personal 🟢 Private documents
Projects 🟡 Project-specific files
Custom 🟣 Create your own

File Sync (Desktop Only)

The desktop app provides bidirectional file synchronization between your local machine and cloud Drive using rclone.

Requirements:

  • General Bots desktop app (Tauri)
  • rclone installed on your system

Setup:

  1. Install rclone: https://rclone.org/install/
  2. Open Drive in the desktop app
  3. Click SettingsSync
  4. Configure your sync folder (default: ~/GeneralBots)
  5. Click Start Sync

Sync Controls: Located in the Drive sidebar under "Sync Status"

Control Description
Start Begin synchronization
Stop Stop current sync
Status Shows idle, syncing, or error

Sync Modes:

Mode Description
Push Local → Cloud only
Pull Cloud → Local only
Bisync Bidirectional (default)

Note: Sync features are only available in the desktop app. Web users see an "unavailable" status as sync requires local filesystem access.


Keyboard Shortcuts

Shortcut Action
Enter Open selected file
Delete Move to trash
Ctrl+C Copy selected
Ctrl+V Paste
Ctrl+X Cut selected
Ctrl+A Select all
F2 Rename selected
Ctrl+F Search files
Ctrl+U Upload files
/ Navigate files

Managing Files via Chat

Upload the quarterly report

📎 Q4-Report.pdf

10:30

File uploaded successfully!

📄 Q4-Report.pdf (2.4 MB)

📁 Saved to: My Drive

10:30

Finding Files

Find the budget spreadsheet

14:15

📁 Found 2 files matching "budget":

📊 Budget-2025.xlsx (245 KB)

📊 Budget-Draft.xlsx (180 KB)

Which one would you like to open?

14:15

Open the 2025 one

14:15

📊 Opening Budget-2025.xlsx...

View in Player or download?

14:15

Sharing Files

Share the project proposal with Sarah

09:00

File shared!

📄 Project-Proposal.pdf

👤 Shared with: Sarah

🔗 Link: https://...

Sarah will receive an email notification.

09:00

Creating Folders

Create a folder called "2025 Projects"

11:20

Folder created!

📁 2025 Projects

📍 Location: My Drive

11:20

API Endpoints

Endpoint Method Description
/api/drive/list GET List files
/api/drive/upload POST Upload file
/api/drive/download/:path GET Download file
/api/drive/delete/:path DELETE Delete file
/api/drive/move POST Move/rename file
/api/drive/copy POST Copy file
/api/drive/mkdir POST Create folder
/api/drive/share POST Share file

Query Parameters

Parameter Values Default
path Folder path /
sort name, size, modified name
order asc, desc asc
view grid, list grid
filter starred, recent, trash none

Response Format

{
    "path": "/Projects/2024",
    "files": [
        {
            "name": "Report.pdf",
            "type": "file",
            "size": 245000,
            "modified": "2024-03-15T10:30:00Z",
            "starred": false,
            "shared": true
        },
        {
            "name": "Documents",
            "type": "folder",
            "modified": "2024-03-14T09:00:00Z",
            "starred": true
        }
    ],
    "storage": {
        "used": 4500000000,
        "total": 10737418240
    }
}

File Type Icons

Type Extensions Icon
Document .pdf, .doc, .docx 📄
Spreadsheet .xls, .xlsx, .csv 📊
Presentation .ppt, .pptx 📽️
Image .jpg, .png, .gif, .svg 🖼️
Video .mp4, .webm, .mov 🎬
Audio .mp3, .wav, .ogg 🎵
Archive .zip, .tar, .gz 📦
Code .js, .py, .rs, .html 💻
Folder - 📁

Storage Backend

Drive uses SeaweedFS for object storage:

  • Scalable: Grows with your needs
  • Redundant: Data replicated across nodes
  • Fast: Optimized for small and large files
  • S3 Compatible: Works with standard S3 tools

Configure storage in config.csv:

key,value
drive-server,http://localhost:9000
drive-bucket,bot-files
drive-quota-gb,10

Troubleshooting

Upload Fails

  1. Check file size (default limit: 100MB)
  2. Verify storage quota isn't exceeded
  3. Check network connection
  4. Try smaller files or compress first

Files Not Displaying

  1. Refresh the page
  2. Check folder path is correct
  3. Verify file permissions
  4. Clear browser cache

Sharing Not Working

  1. Verify recipient email address
  2. Check sharing permissions
  3. Ensure file isn't in Trash

See Also