# Media Files Upload Instructions

## Problem Identified
- **128 media files** exist in database but missing from production server
- Files exist locally in `./media/` but not on production at `/home/acbptxvs/public_html/branchbusinessadvance.co.ke/media/`

## Quick Fix - Upload via cPanel

### Step 1: Access cPanel File Manager
1. Login to your hosting cPanel
2. Open **File Manager**
3. Navigate to: `/home/acbptxvs/public_html/branchbusinessadvance.co.ke/`

### Step 2: Upload Media Folder
1. **Compress** your local `media` folder to `media.zip`
2. **Upload** `media.zip` to the production directory
3. **Extract** the zip file in the same location
4. **Delete** the zip file after extraction

### Step 3: Set Permissions
1. Right-click on `media` folder → **Permissions**
2. Set folder permissions to **755** (rwxr-xr-x)
3. Set file permissions to **644** (rw-r--r--)
4. Apply to all subdirectories and files

### Step 4: Verify Structure
Ensure this structure exists:
```
/home/acbptxvs/public_html/branchbusinessadvance.co.ke/media/
├── kyc/
│   ├── selfies/
│   ├── id_documents/
│   ├── bank_statements/
│   ├── utility_bills/
│   ├── business_licenses/
│   ├── tax_certificates/
│   ├── logbooks/
│   ├── title_deeds/
│   └── signatures/
├── profile_images/
└── receipts/
```

## Alternative: FTP Upload
If you prefer FTP:
```bash
# Upload entire media folder
ftp your-server.com
cd /home/acbptxvs/public_html/branchbusinessadvance.co.ke/
put -r media/
```

## Test After Upload
1. Visit: `https://branchbusinessadvance.co.ke/media/kyc/selfies/[filename]`
2. Check client list page for profile images
3. Verify document uploads work

## Files to Upload
The script identified these missing file types:
- Selfies (kyc/selfies/)
- ID Documents (kyc/id_documents/)
- Utility Bills (kyc/utility_bills/)
- Bank Statements (kyc/bank_statements/)
- Profile Images (profile_images/)

**Total: 128 files need uploading**
