Skip to main content

create_upload

Function create_upload 

Source
pub async fn create_upload(
    __arg0: State<AppState>,
    identity: Option<Extension<Identity>>,
    __arg2: Json<CreateUpload>,
) -> Response
Expand description

POST /api/v1/fs/uploads — open a session.

Resolving the destination, creating the staging directory, and opening the staging file (UploadStore::create) are all blocking I/O — same convention as list/list_blocking and download/download_blocking above (src/execution/executor.rs:209-215): run it on spawn_blocking so a slow filesystem can never starve the tokio worker pool that also runs /health and the accept loop.