---
title: "Upload a file to AWS or GCP storage"
method: POST
path: "/api/v1/fileUpload/{name}"
tags: ["FileUpload"]
---

# Upload a file to AWS or GCP storage

`POST /api/v1/fileUpload/{name}`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/fileUpload/{name}`
- Auth: none declared

Uploads a file (zip, tar, tar.gz, json, yaml) to the configured storage provider (AWS or GCP) and returns its public URL.

## Path parameters

- `name` string, required

## Query parameters

- `fileExtension` 'zip' | 'tar' | 'tar.gz' | 'json' | 'yaml' | 'yml', required

## Request body `application/octet-stream`

- string

## Response `200`

Example: {\"s3Link\": \"https://...\"}

- object

## Other responses

- `400`: Example: {\"message\": \"can't read body\"}
- `500`: Example: {\"message\": \"Invalid file extension\"}

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
