mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-12 01:46:08 +00:00
feat: implement storage quota management for uploads
- Added storage quota enforcement for audio and image uploads in the respective routes. - Introduced reservation system to manage concurrent uploads and prevent quota overages. - Enhanced comment creation to account for audio and image attachment sizes against user quotas. - Created new UploadReservation model to track in-flight upload reservations. - Backfilled existing video assets with size information from R2. - Added progress component for UI feedback during uploads. - Updated API responses to include reservation IDs for better quota management. - Adjusted error handling to return appropriate storage limit exceeded messages.
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ import { getStripe, getStripePriceId } from '@/lib/stripe';
|
||||
import { logError } from '@/lib/logger';
|
||||
|
||||
const BUNNY_API_BASE = 'https://video.bunnycdn.com';
|
||||
const STORAGE_CACHE_SECONDS = 600;
|
||||
const STORAGE_CACHE_SECONDS = 120;
|
||||
|
||||
interface R2StorageSnapshot {
|
||||
fileSizes: Map<string, number>;
|
||||
|
||||
Reference in New Issue
Block a user