---
title: "Tải tệp lên cho câu hỏi loại FileUpload (multipart/form-data, có thể nhiều tệp)"
method: POST
path: "/surveys/{surveyId}/files"
tags: ["Surveys"]
---

# Tải tệp lên cho câu hỏi loại FileUpload (multipart/form-data, có thể nhiều tệp)

`POST /surveys/{surveyId}/files`

## Request

- Base URL: `https://api.fireant.vn`
- URL: `https://api.fireant.vn/surveys/{surveyId}/files`
- Auth: none declared
- TypeScript: <https://skmtc.dev/fireant/apis/fireant-restful-api/docs/surveys/:surveyId/files/post.ts> (a function with typed inputs; its response is checked against the schema)

Đuôi tệp và dung lượng được kiểm tra theo cấu hình của câu hỏi. URL trả về dùng trong answers[].fileUrls khi gửi phản hồi.

## Path parameters

- `surveyId` integer, required

## Query parameters

- `questionId` integer, required

## Response `201`

Danh sách tệp đã lưu

- FireAntApiModelsSurveysSurveyFileUploadResult[]
  - `fileName` string: Tên tệp gốc
  - `url` string: URL công khai của tệp - dùng trong answers[].fileUrls
  - `size` integer: Kích thước (byte)
  - `contentType` string: Content type

## Other responses

- `400`: Tệp không hợp lệ
- `415`: Không phải multipart/form-data

## Changes

- **2026-09-25** `a481789cd81c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fireant/apis/fireant-restful-api/changes/surveys/:surveyId/files/post.md)

---

[API](https://skmtc.dev/fireant/apis/fireant-restful-api.md) - [All operations](https://skmtc.dev/fireant/apis/fireant-restful-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireant/apis/fireant-restful-api/revisions/c9b3aa855f95?raw)
