Attachments: Put
PutAttachment is used to insert or update an attachment in a database.
Syntax
curl \
http://{serverName}/databases/{databaseName}/static/{attachmentName} \
-X PUT
Request
Header |
Required |
Description |
If-None-Match |
No |
current attachment etag, used for concurrency checks |
any header |
No |
Metadata |
Response
Status code |
Description |
201 |
Created |
Header |
Description |
ETag |
Attachment ETag |
Example I
curl -X PUT "http://localhost:8080/databases/NorthWind/static/albums/holidays/sea.jpg" \
--header "Description: Holidays 2014" \
-d @sea.jpg
< HTTP/1.1 201 Created
< ETag: "02000000-0000-0004-0000-000000000002"
< Location: /static/albums/holidays/sea.jpg