Appearance
External Upload
File Information
- Path:
pages/_workspace_id/external/upload.vue - Route:
/:workspace_id/external/upload - Purpose: External user asset upload interface with OTP verification
Overview
The External Upload page allows external/guest users to upload files to a workspace after OTP verification. It provides a simplified upload interface with file validation, progress tracking, and upload queue management specifically designed for external users with limited access.
Key Features
OTP Verification
- OTP code input
- Email verification
- Session management
- Access validation
File Upload
- Drag-and-drop upload
- File selection
- File validation
- Upload progress tracking
Upload Queue
- Multiple file uploads
- Queue management
- Progress indicators
- Error handling
External User Context
- Workspace validation
- Access permission checks
- Upload limits enforcement
- Session management
Components Used
upload-chunk-external- External chunked upload component- File upload components
- Progress indicators
- OTP input components
Data Properties
javascript
{
files: [], // Selected files
uploadQueue: [], // Upload queue
uploading: false, // Upload state
uploadProgress: {}, // Progress by file
errors: [], // Upload errors
verified: false, // OTP verification status
workspaceId: null // Workspace ID from route
}Computed Properties
workspaceId
Returns workspace ID from route
canUpload
Checks if user can upload (verified and has permission)
uploadProgress
Returns overall upload progress
Methods
verifyOTP(otpCode)
Verifies OTP code:
- Validates OTP with backend
- Sets verified status
- Creates session
- Handles errors
selectFiles(files)
Selects files for upload:
- Validates file types
- Validates file sizes
- Adds to upload queue
- Checks upload limits
uploadFiles()
Starts file upload:
- Validates verification status
- Processes upload queue
- Tracks progress
- Handles errors
removeFile(fileId)
Removes file from queue:
- Removes from queue
- Cancels upload if in progress
- Updates UI
API Endpoints
Verify OTP
- Endpoint:
POST /external/verify-otp - Request Body: OTP code and workspace ID
- Response: Verification token and session
Upload File (External)
- Endpoint:
POST /external/upload - Request: FormData with file and metadata
- Response: Upload confirmation
Get Upload Status
- Endpoint:
GET /external/upload-status - Query Parameters:
upload_id - Response: Upload status and progress
User Flow
- External user navigates to upload page
- User enters OTP code (if not verified)
- OTP is verified
- User selects files for upload
- Files are validated
- Upload starts automatically
- Progress is tracked
- Upload completes
- Success message displayed
Middleware
external-upload-auth- External upload authenticationexternal-otp-verify- OTP verification check
Notes for Development
- Page requires external user authentication
- OTP verification required before upload
- Upload limits enforced per external user
- Session expires after upload
- Uses external upload mixin
Related Documentation
- External Uploads Mixin - External upload functionality
- External Verify Page - OTP verification
- File Upload Feature - Upload system