简体中文
将本地文件或通过 URL 将文件上传至指定记录中附件字段的末尾
https://app.teable.io/favicon.ico
{ "id": "rec123456789ABCDE", "fields": { "fld123456789ABCDE": [ { "id": "act75TiSyhcS7hfrizW", "name": "example.jpg", "path": "table/example", "size": 392903, "token": "tokenxxxxx", "width": 976, "height": 1000, "mimetype": "image/jpeg", "presignedUrl": "https://sss.teable.io/pvt-assets/table/previewURL" } ], } }
# 通过文件上传 curl -X POST 'https://app.teable.cn/api/table/__tableId__/record/__recordId__/__fieldId__/uploadAttachment' \ -H 'Authorization: Bearer __token__' \ -H 'Content-Type: multipart/form-data' \ -F 'file=@/path/to/your/file.jpg' # 通过 URL 上传 curl -X POST 'https://app.teable.cn/api/table/__tableId__/record/__recordId__/__fieldId__/uploadAttachment' \ -H 'Authorization: Bearer __token__' \ -H 'Content-Type: multipart/form-data' \ -F 'fileUrl=https://example.com/image.jpg'