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 Code | Error Code | Description |
|---|---|---|
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 413 | HTTP_413 | Error |
| 400 | HTTP_400 | Bad Request |
| 400 | HTTP_400 | Bad Request |
| 400 | HTTP_400 | Bad Request |
| 403 | HTTP_403 | Forbidden |
| 413 | HTTP_413 | Error |
| 500 | HTTP_500 | Internal Server Error |
| 500 | HTTP_500 | Internal Server Error |
| 500 | HTTP_500 | Internal Server Error |
| 500 | HTTP_500 | Internal Server Error |
Example Request
curl -X POST "https://api.allurelms.com/scorm/upload" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'