DELETE FROM upload_temp WHERE name IS NULL OR mime IS NULL;
INSERT INTO upload_temp(name, mime, content) VALUES (:file_name, :mime_type, :content)
RETURNING 'redirect' AS component, '/upload?rowid='||rowid AS link;
