POST /scorm/upload

POST /scorm/upload

Supabase Storage bucket name Configure route for large file uploads 5 minutes for large files Request validation schema Verify authentication with Clerk Use service role client to bypass RLS for profile lookup Get user profile for tenant_id Check if user has permission to upload SCORM packages Check for explicit permissions Parse FormData - handle large files gracefully Check if it's a body size limit error Validate required fields Validate request body Verify tenant_id matches user's tenant Check file size (max 10GB) 10GB Convert File to Buffer for server-side upload Upload to storage (R2 or Supabase) Upload to R2 server-side (no CORS issues) Fallback to Supabase Storage

Endpoint

POST /scorm/upload

Authentication

This endpoint requires authentication. Include your authentication token in the request headers.

Error Responses

Status CodeError CodeDescription
401HTTP_401Unauthorized
404HTTP_404Not Found
403HTTP_403Forbidden
413HTTP_413Error
400HTTP_400Bad Request
400HTTP_400Bad Request
400HTTP_400Bad Request
403HTTP_403Forbidden
413HTTP_413Error
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error

Example Request

curl -X POST "https://api.allurelms.com/scorm/upload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'