How to use blob.attach operation with CURL ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2012 12:14 PM
Hi I'm trying to attach a blob to a file in nuxeo with the linux command curl but i can't find the right syntax to make the operation. I have allready read the documetation from : http://doc.nuxeo.com/display/NXDOC/REST+API and http://doc.nuxeo.com/display/NXDOC55/Using+cURL, but I still don't know how to manage blob.attach with CURL.
Thank you in advance for your advice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2013 01:01 PM
same question, does anybody have a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2013 03:07 AM
same question. In general the documentation on REST APIs is really inadequate. Hopefully some more examples will be provided?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2013 02:16 PM
Here's a working curl command against 5.7.3:
curl -X POST -F request="{"params":{"document":"/default-domain/workspaces/mydoc"},"context":{}}" -F input=@myblob.bin http://localhost:8080/nuxeo/site/automation/Blob.Attach
Notes:
- POST method
- -F option tells curl to use multi-part/formdata encoding
- note the JSON 'request' parameter, the 'document' element refers to an existing document that is of "File" doctype.
- @myblob.bin tells curl to send the contents of the file 'myblob.bin'
Hope that helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2013 08:06 PM
Excellent that got me going, thanks!
