---
title: "Uploads a file to our system and returns the new file name used internally."
method: POST
path: "/asset/file"
tags: ["Asset"]
---

# Uploads a file to our system and returns the new file name used internally.

`POST /asset/file`

## Query parameters

- `compress` boolean
- `quality` integer
- `maxdim` integer

## Response `200`

OK

- UploadFileEndpointOutput
  - `fileName` string, required — The generated file name used internally to reference the uploaded asset. This is not the original file name and should be used for all subsequent operations on this asset.
  - `warnings` string[], required — Any warnings that might have occurred during the upload.
  - `wasCompressed` boolean, required — Whether the uploaded file was compressed during processing.
  - `originalSizeBytes` integer, nullable — The original size of the uploaded file in bytes, if available. This may be null if the size could not be determined.
  - `finalSizeBytes` integer, nullable — The final size of the stored file in bytes after processing (e.g., compression), if available. This may be null if the size could not be determined. If compression was applied, this size may be smaller than the original size.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
