Skip to main content

handle_attachment_upload

Function handle_attachment_upload 

Source
pub(super) async fn handle_attachment_upload(
    __arg0: State<AppState>,
    __arg1: Query<UploadQuery>,
    body: Body,
) -> Response
Expand description

POST /api/v1/attachments/upload?name= — body is one image file. → 200 AttachmentInfo · 400 empty · 413 over the per-file cap · 415 not a supported image · 500 I/O.

The body is read as a stream and counted as it is written: axum’s DefaultBodyLimit only governs buffering extractors, so it would not stop a streamed body.