---
title: "Generate Pre-signed Upload URL"
method: POST
path: "/get-upload-url"
tags: ["Upload"]
---

# Generate Pre-signed Upload URL

`POST /get-upload-url`

Generates a pre-signed URL for secure direct file upload to cloud storage.
The URL expires after a specified duration for security.

**Note**: File size is limited to 100MB per upload.

## Request body

- object
  - `originalFileName` string, required — Original name of the file to be uploaded
  - `fileType` 'image/jpeg' | 'image/png' | 'image/webp', required — MIME type of the file
  - `fileSize` integer, required — File size in bytes (max 100MB)

## Response `200`

Pre-signed URL generated successfully

- object
  - `status` 'success', required
  - `data` object, required
    - `uploadURL` string, uri, required — Pre-signed URL for upload
    - `fileName` string, required — Generated unique filename
    - `fileType` string — MIME type of file
    - `fileSize` integer — File size in bytes
    - `originalFileName` string — Original filename
    - `createdAt` integer — URL creation timestamp (Unix ms)
    - `expiresAt` integer, required — URL expiration timestamp (Unix ms)

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed or API key missing
- `429` — Rate limit exceeded
- `500` — Internal server error occurred

## Changes

- **2025-01-14** `5c6242cc0763` — 8 breaking, 4 warning, 13 info
  - request body became required
  - request property `fileType` was restricted to a list of enum values
  - the request property `fileSize` became required
  - the request property `fileType` became required
  - …21 more
- **2024-11-10** `ce3636863d93` — 1 warning
  - removed the optional property `data/path` from the response with the `200` status
- **2024-10-22** `77e0fca87b92` — 1 info
  - endpoint added
- **2024-10-22** `fa796ac65c29` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/upscayl/apis/upscayl-cloud-api/changes/get-upload-url/post.md)

---

[API](https://skmtc.dev/upscayl/apis/upscayl-cloud-api.md) · [All operations](https://skmtc.dev/upscayl/apis/upscayl-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/upscayl/upscayl-cloud-api/revisions/2320ccb2ffed/schema)
