Skip to Main Content
Riverty Docs
riverty logo Docs

Upload a File

Return details for upload file
The maximum size is 20MB. Allowed extensions are: .pdf, .jpg, .png, .gif, .jpeg, .docx, .doc, .bmp

Path

POST /attachments

Request Body

application/json

Responses

  • id
    string
    The unique identifier of the attachment.
    fileName
    string
    The name for the attachment that has been generated for internal use.
    originalFileName
    string
    The name that the attachment was originally uploaded with.
    thumbnailUrl
    string
    If a thumbnail has been created, this will be the URL to it with a time-limited access token.
    createdAt
    string
    yyyy-MM-ddTHH:mm:ss.fffffffzzz
    When it was created.
    size
    integer
    The number of bytes.
    mimeType
    string
    The type of file content, e.g. image/jpeg.
    originalFileUrl
    string
    The direct link to download the file.
    malwareDetected
    boolean
    Unpopulated if the attachment has not been scanned yet. True if malware was detected, false if not.
  • 400 An attempt was made to upload a file without contents
  • 422 The file extension is not permitted
200 Successful Request

Request Example

    
        {
 "file": "binary using multipart/form-data content-type"
}
    

Response Example

    
        {
 "id": "d3cd4950-9541-4867-063f-08ddb25bc8cc",
 "size": 1784046,
 "mimeType": "image/jpeg",
 "createdAt": "2025-06-24T08:17:00Z",
 "originalFileName": "Group_of_cats.jpg"
}