Allows authenticated users to attach files to a document in their library.
- id: Id of the document we want to attach the file to. For new documents, this requires first using the "Create new document" method and using the returned id. For existing documents without a file, simply use the user document id obtained via either the "Library" or "Document details" methods.
- oauth_body_hash: SHA1 of the file. This requires to be part of the authorization header.
The Content-Disposition header must be present in the request including the filename with the extension. See example.
404 Not Found
Current limit is set to 150 files/hr. This is likely to be increased after a short period of load and usage behavior testing.
PUT http://api.mendeley.com/oapi/library/documents/3690294671/ HTTP/1.1
Content-Disposition: attachment; filename="test.pdf"
The file hash has to be included in the request authorization header, but excluded from the request signature. We'll add it as the oauth_body_hash:
A successful request will return a 201 Created header.