Upload Profile Attachment
Upload a attachment to the specified profile.
Note
If the mime type of the attachment is not on the valid list will fail.
Resource Information
This service uses the tomcat application on port 8080 by default. To see a list of default ports click here
The context for this API is /crafter-profile
, please prefix the API URLs with this context.
HTTP Verb
|
POST
|
URL
|
/api/1/profile/:id/uploadAttachment |
Response Formats
|
JSON |
Parameters
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
accessTokenId
|
String
|
✓
|
The access token ID of the application
making the call
|
id
|
File
|
✓
|
The profile’s ID
|
attachment
|
String
|
✓
|
File to be uploaded
|
Example
Request
POST .../api/1/profile/59284659d4c650213cc2f3fc/uploadAttachment?accessTokenId=e8f5170c-877b-416f-b70f-4b09772f8e2d
Note
This request needs to be sent with Content-Type=multipart/form-data
and the binary file as parameter attachment
.
Response
Status 200 OK
1{
2 "md5": "498a1e16be56873ef53a1a61295d1781",
3 "contentType": "image/jpeg",
4 "fileSize": "22.6 KB",
5 "fileName": "picture1",
6 "fileSizeBytes": 23193,
7 "id": "59285cd3d4c650213cc2f3fd"
8}
Responses
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above.
|
|
500
|
{ "message" : "Internal server error" } |