Files.attributes.size in swagger docs declared as string but it appeared to be int. So what's the type of it should be?

ERROR posting signals to Amity: error while getting session: json: cannot unmarshal number into Go struct field .files.attributes.size of type string

Hello, to help us better understand the issue, could you please provide the specific endpoint you are experiencing problems with, along with a sample cURL command you’re using? Thank you.

POST/api/v4/images
it’s the swagger response with size string

[
  {
    "fileId": "string",
    "fileUrl": "string",
    "type": "image",
    "createdAt": "2024-06-13T06:39:29.468Z",
    "updatedAt": "2024-06-13T06:39:29.468Z",
    "attributes": {
      "name": "test.jpeg",
      "extension": "jpeg",
      "size": "2107842",
      "mimeType": "image/jpeg",
      "metadata": {
        "height": 0,
        "width": 0,
        "isFull": true
      }
    }
  }
]

we receive it like this
“files”: [
{
“fileId”: “37ba4145c5c8427da316c7eea185b0f3”,
“fileUrl”: “https://api.eu.amity.co/api/v3/files/37ba4145c5c8427da316c7eea185b0f3/download”,
“type”: “image”,
“createdAt”: “2024-04-18T07:13:39.137Z”,
“updatedAt”: “2024-04-18T07:30:06.087Z”,
“attributes”: {
“name”: “image-2024-04-18-10-02-37-664.png”,
“extension”: “png”,
“size”: 5880,
“mimeType”: “image/png”,
“metadata”: {
“height”: 225,
“width”: 225,
“isFull”: false
}
}
},

is it okay? what’s the size type should be?

Hello, please continue following the current response as it is correct. We will inform the team to update our API documentation. We apologize for any inconvenience.

Okay, thanks! Can you confirm please that size parameter from files.attributes.size is int in every files-related endpoints and we can use it?

Hello, yes, file size-related attributes should be integers. If you encounter any other endpoints where there is a discrepancy between our API documentation and the actual response, we recommend sticking with the actual response. Please feel free to reach out if you face any issues.