pub async fn abort(
pool: &PgPool,
vault: &Vault,
actor: &Actor,
id: Uuid,
) -> AppResult<()>Expand description
Cancels an upload and deletes what was received.
§Invariants
- Permission: the actor’s own session (404 otherwise).
- Locks: the session row (
FOR UPDATE). - Steps: the session row is deleted and committed first, then the staging
file is removed; a failure in between leaves a staging file without a
session, which
purge_expiredremoves later. - Audit, notifications, webhooks: none.