Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Type

Description

file

Binary

File content

meta.category

String

File category. This is to mark the usage of the attachments. For now the possible reasons are 'intake_attachment', 'user_consent', 'user_avatar', 'user_document'

X-ApiToken

String

The token of the user who is uploading the file. They will be considered the file owner.

Response

Code Block
curl -X POST \
  https://api.vsee.io/cc/ligeng/api_v3/files \
  -H 'X-ApiToken: 4df5b2b7dec8a8c40e142e43c1825502' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F file=@/Users/teligeng/Pictures/p878984.jpg \
  -F meta.category=user_document

{
    "data": {
        "id": "5e15d150-19b4-4cbd-b217-332fc71b6977",
        "name": "p878984.jpg",
        "size": 40679,
        "ext": "jpg",
        "fullpath": "https://api.vsee.io/cc/ligeng/files/view/5e15d150-19b4-4cbd-b217-332fc71b6977?auth_code=e86ceb8b57c91e4db41611f08311a125e2df0b09&time=1578488144",
        "meta": {
            "category": "user_document",
            "target": {
                "id": "350936",
                "type": "user"
            },
            "account": {
                "code": "5c47c63907c44f0486a16e1dc71b6977"
            }
        },
        "creator": {
            "id": "350936",
            "username": "ligeng+trial14+member01@vseelab.com",
            "email": "ligeng+trial14+member01@vseelab.com",
            "full_name": "Ligeng Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Name"
        }
    }
}

...