Teable
Quick Start
Upload Attachment
Upload local files or files via URL to the end of an attachment field in a specified record
Path
POST /table/{tableId}/record/{recordId}/{fieldId}/uploadAttachment
Request
Path Parameters
- tableId (string): The unique identifier of the table (how to get).
- recordId (string): The unique identifier of the record to update (how to get).
- fieldId (string): The ID of the attachment field to upload to (how to get)
Attachment fields can contain multiple attachments. This API allows uploading one attachment at a time to the end of the cell.
To delete or reorder attachments, use the Update Record API.
fieldId must be an attachment type field.
Through the API, uploaded attachments are limited to 100MB in the cloud version, with no limit in the self-hosted version.
Request Body
Type: formData
Parameters:
- file (optional)
- Description: The record data to update
- Type: Buffer or ReadStream
- fileUrl (optional)
- Description: The URL to upload from
- Type: String
- Example:
https://app.teable.io/favicon.ico
- Note: Only one of file or fileUrl can be specified at a time. If both are specified, file takes precedence.
Response
Success Response
- Status code: 201 Created
- Response body: Returns the updated record data.
Example Response Body
Error Responses
- Status code: 400 Bad Request: Request body format error or missing required fields.
- Status code: 404 Not Found: Specified tableId or recordId does not exist.