---
title: "Stages an uploaded image file in the temp directory for use in a cover image replacement flow. This is automatically cleaned up."
method: POST
path: "/api/Upload/upload-by-file"
tags: ["Upload"]
---

# Stages an uploaded image file in the temp directory for use in a cover image replacement flow. This is automatically cleaned up.

`POST /api/Upload/upload-by-file`

## Request

- Base URL: `http://localhost:5000`
- URL: `http://localhost:5000/api/Upload/upload-by-file`
- Auth: API key in header `x-api-key`

## Request body `multipart/form-data`

- object
  - `file` string, binary: The image file to stage

## Response `200`

OK

- string

## Changes

- **2026-05-31** `3d5b8ba8bc3b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kareadita/apis/kavita/changes/api/Upload/upload-by-file/post.md)

---

[API](https://skmtc.dev/kareadita/apis/kavita.md) - [All operations](https://skmtc.dev/kareadita/apis/kavita/llms.txt) - [OpenAPI document](https://skmtc.dev/kareadita/apis/kavita/revisions/d266465eeb67?raw)
