Skip to main content

upload_exercise_files

Function upload_exercise_files 

Source
async fn upload_exercise_files(
    pool: Data<PgPool>,
    file_store: Data<dyn FileStore>,
    exercise_id: Path<Uuid>,
    payload: Multipart,
    user: UserFromOAuthToken,
    app_conf: Data<ApplicationConfiguration>,
    _client: SupportedClient,
) -> ControllerResult<Json<UploadedFiles>>
Expand description
  • POST /api/v0/exercise-services/client/exercises/:id/files
  • Stores files for a later submission to this exercise. Every multipart field name must be a
  • UUID the client picks; the host assigns the ids a submit request then names. Uploads are
  • bound to this exercise and user, and unreferenced ones are reaped, so a client should upload
  • immediately before submitting.
  • Gated on the caller being able to answer the exercise at all, so stored objects cannot be
  • accumulated past a deadline or a closed exam. The per-slide try limit is only checked across the
  • whole exercise here, because this route is bound to an exercise rather than a slide.