Skip to main content

process_exercise_service_upload

Function process_exercise_service_upload 

Source
pub async fn process_exercise_service_upload(
    conn: &mut PgConnection,
    exercise_service_slug: &str,
    payload: Multipart,
    file_store: &dyn FileStore,
    uploaded_paths: &mut Vec<ExerciseServiceUploadCleanup>,
    uploader: Option<Uuid>,
    base_url: &str,
) -> Result<Vec<ExerciseServiceUpload>, ControllerError>
Expand description

Processes an upload from an exercise service, an exercise iframe or a native client. This function assumes that any permission checks have already been made.

exercise_service_slug namespaces the stored objects and is recorded with the upload; it carries no authorization meaning. The playground passes its reserved playground slug, which names no exercise service.