Attachment POST Resources

Uploads MUST be performed using the multipart/form-data Content-Type.

Simple file upload (deprecated since 2.311.0)

endpoint to upload images which can be displayed inline. POST /upload

Upload a question attachment

POST /questions/:id/attachments
Parameter Type Default Required Description
file file Any file type which is allowed for the network.

Response

{
    "id": 42,
    "name": "sherlock.zip",
    "hash": "017eb2b4018cd555cdb3db0a79c1e65d68bd376a",
    "size": 32054569,
    "mime_type": "application/zip",
    "created": "2012-05-20T14:35:27.000Z"
}

Upload a solution attachment

POST /solutions/:id/attachments
Parameter Type Default Required Description
file file Any file type which is allowed for the network.

Response

{
    "id": 42,
    "name": "sherlock.zip",
    "hash": "017eb2b4018cd555cdb3db0a79c1e65d68bd376a",
    "size": 32054569,
    "mime_type": "application/zip",
    "created": "2012-05-20T14:35:27.000Z"
}