Skip to main content

validate_media_headers

Function validate_media_headers 

Source
async fn validate_media_headers(
    headers: &HeaderMap,
    user: &AuthUser,
    conn: &mut PgConnection,
) -> ControllerResult<()>
Expand description

Refuses a media upload unless it is multipart form data whose declared Content-Length is within the limit of its X-File-Type, and the user teaches some course. The headers are the client’s claims; the stored size is not checked here.