Skip to main content

handle_viewer_attachment

Function handle_viewer_attachment 

Source
pub(crate) async fn handle_viewer_attachment(
    __arg0: State<AppState>,
    __arg1: Extension<ViewerCaller>,
    __arg2: Path<(String, String)>,
    __arg3: Query<AttachmentQuery>,
    uri: Uri,
    headers: HeaderMap,
) -> Response
Expand description

The attachment, as Content-Type and bytes; 404 for an agent that isn’t this channel’s or is hidden, an id the line at at doesn’t name, or one no longer stored; 409 gen_changed; 415 not_viewable; 413 too_large. A computer’s read is signed as its feed open is (http_viewer_computers::refuse_unsigned_open), over the path and the query, so the attachment and line asked for are the ones signed for; its token alone reads nothing.