0.6.2 - Image Upload & Asset Management
Image Upload & Asset Management
Section titled “Image Upload & Asset Management”🎉 Features
Section titled “🎉 Features”Image Upload System
Section titled “Image Upload System”- Dual Upload Methods: Users can now add images via URL (free) or file upload (premium feature)
- Cloudflare Integration: Seamless integration with Cloudflare Images for premium file uploads
- Asset Management: New database table and API endpoints for tracking uploaded assets
- Image Uploader Component: Interactive dialog with mode switching between URL and file upload
- Premium Gating: File uploads are restricted to premium subscribers with informative prompts
Enhanced Editor Integration
Section titled “Enhanced Editor Integration”- Image Insertion: Direct image insertion from the editor toolbar
- Alt Text Support: Image labels are used as alt text for accessibility
- HTML Rendering: Images with alt text now display descriptive labels below the image in HTML output
- File Upload Flow: Complete two-step upload process (request URL → upload → confirm)
User Interface Improvements
Section titled “User Interface Improvements”- Premium Prompts: Educational premium upgrade prompts when accessing restricted features
- Tooltip Component: New reusable tooltip component for better UX
- Subscription Management: Streamlined premium upgrade interface
🔧 Technical Improvements
Section titled “🔧 Technical Improvements”Database Schema
Section titled “Database Schema”- Asset Table: New
asset
table with proper foreign key relationships to campaigns and users - Cloudflare ID Tracking: Unique constraint on Cloudflare image IDs
- Cascade Deletions: Proper cleanup when campaigns or users are deleted
API Endpoints
Section titled “API Endpoints”- Upload URL Generation:
/api/campaigns/[campaignSlug]/assets/upload-url
for secure upload initiation - Upload Confirmation:
/api/campaigns/[campaignSlug]/assets/confirm-upload
for finalizing uploads - Premium Validation: Server-side premium subscription checks for all upload operations
- Error Handling: Comprehensive error responses for various failure scenarios
Environment Configuration
Section titled “Environment Configuration”- Cloudflare Credentials: Added
CLOUDFLARE_ACCOUNT_ID
andCLOUDFLARE_IMAGES_TOKEN
environment variables - Secure Configuration: Environment variables properly configured as server-side secrets
Code Quality
Section titled “Code Quality”- Asset Queries Hook: New
useAssetQueries
hook for managing asset-related API calls - Type Safety: Enhanced TypeScript types for asset management
- Component Architecture: Modular image uploader component with clear separation of concerns
- HTML Processing: Enhanced Slate text extractor for proper image rendering with labels
🏗️ Infrastructure
Section titled “🏗️ Infrastructure”Cloudflare Images
Section titled “Cloudflare Images”- Direct Upload: Secure direct upload URLs for client-side file uploads
- Image Variants: Automatic generation of optimized image variants
- Metadata Storage: Campaign and user context stored with each uploaded image
- Public Access: Images served through Cloudflare’s CDN with public variants
Build Optimizations
Section titled “Build Optimizations”- Package Updates: Added
@radix-ui/react-tooltip
for enhanced UI components - Configuration Cleanup: Removed unused Partytown integration from Astro config
🛡️ Security & Premium Features
Section titled “🛡️ Security & Premium Features”Access Control
Section titled “Access Control”- Premium Verification: All file upload operations verify active premium subscriptions
- User Ownership: Assets are properly associated with users and campaigns
- Campaign Isolation: Users can only upload to their own campaigns
Data Protection
Section titled “Data Protection”- Secure Upload URLs: Time-limited, signed URLs for secure file uploads
- Metadata Validation: Server-side validation of all upload parameters
- Cascade Protection: Proper database constraints prevent orphaned assets
This release represents a significant milestone in Arc Aide’s development, introducing comprehensive asset management capabilities while maintaining the free tier’s accessibility through URL-based image insertion.