POST api/Village/{village}/Event/{activityId}/Attachment
Upload an attachment. This method MUST be called with multipart/form-data encoding for the file. The request payload for the image MUST have Content-Disposition and Content-Type headers. The 'name' in the Content-Disposition header MUST be "file": Content-Disposition: form-data; name="file"; filename="whatever-you-want"Content-Type: mime/type
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
activityId | globally unique identifier |
Required |
|
village | string |
None. |
Body Parameters
ApiRawUploadModelName | Description | Type | Additional information |
---|---|---|---|
file |
The file to be uploaded |
ApiFileUpload |
None. |
Request Formats
application/json, text/json
Sample:
{ "file": null }
application/xml
Sample:
text/xml
Sample:
multipart/form-data
Sample:
Response Information
Resource Description
Document model for the newly uploaded document
AttachmentModelName | Description | Type | Additional information |
---|---|---|---|
Id |
Attachment ID |
globally unique identifier |
None. |
Size |
File size |
integer |
None. |
FileName |
Original File Name |
string |
None. |
ContentType |
MIME Content Type |
string |
None. |
UploadedBy |
Name of user who uploaded the attachment |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "Id": "597c5f68-b209-4fa2-a158-6aa672b16823", "Size": 2, "FileName": "sample string 3", "ContentType": "sample string 4", "UploadedBy": "sample string 5" }
application/xml, text/xml
Sample:
<AttachmentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models"> <ContentType>sample string 4</ContentType> <FileName>sample string 3</FileName> <Id>597c5f68-b209-4fa2-a158-6aa672b16823</Id> <Size>2</Size> <UploadedBy>sample string 5</UploadedBy> </AttachmentModel>