PhoenixKitWeb.UploadController (phoenix_kit v1.5.1)
View SourceFile upload controller for handling multipart uploads.
Accepts file uploads, validates them, and queues them for background processing.
Summary
Functions
Upload a file via multipart form.
Functions
Upload a file via multipart form.
Request
POST /api/uploadParameters
file(required): The file to upload (multipart/form-data)user_id(optional): Override user ID (admin only)
Response
Success (200):
{
"file_id": "uuidv7-string",
"original_filename": "photo.jpg",
"file_type": "image",
"mime_type": "image/jpeg",
"size": 1234567,
"status": "processing",
"message": "Upload successful, processing variants..."
}Error (400):
{
"error": "INVALID_FILE_TYPE",
"message": "File type not allowed"
}Error (413):
{
"error": "FILE_TOO_LARGE",
"message": "File size exceeds maximum allowed (100MB)"
}