Attach a file


PUT /api/project/:projectId/:model/:modelId/files/:fileId

Attach specified files to tasks or notes.

Endpoint URL

https://<space_id>.repsona.com/api/project/:projectId/:model/:modelId/files/:fileId

Authorization

Owner Admin Member

Path parameters

NameTypeDescription
projectId*stringProject ID
model*enum (task, task_comment, note, note_comment)Task, Task comment, Note, Note comment
modelId*stringTask ID, Task comment ID, Note ID, Note comment ID
fileId*stringFile ID

Example responses

{
  "requestedBy": 1,
  "project": 1,
  "task": {
    "files": [
      {
        "createdAt": 1672498800000,
        "updatedAt": 1672498800000,
        "id": 1746,
        "hash": "54105a8a-c39e-4a44-b5be-b9a23e81771a",
        "size": 45171,
        "type": "image/jpeg",
        "filename": "smiling-888532_640.jpg",
        "extra": null,
        "space": 1,
        "user": 1,
        "project": 1
      }
    ],
    "createdAt": 1672498800000,
    "updatedAt": 1672498800000,
    "id": 1746,
    "name": "Task name",
    "sortOrder": 1,
    "priority": 2,
    "planned": null,
    "actual": null,
    "description": "Task Description",
    "dueDate": 1672498800000,
    "startDate": 1672498800000,
    "space": 1,
    "status": 1,
    "parent": 2,
    "project": 1,
    "milestone": 1,
    "responsibleUser": 1,
    "ballHoldingUser": 1
  }
}

Human-centered, best team!

Repsona is an ideal work management tool for your team
Get started for free