- create a document in nuxeo
- try the following code to attach a picture (see attachments):
Blob fileBlob = new Blob(new File("/Users/ffischer/Downloads/breakout2600_2.png")); Blob blob = nuxeoClient.automation().newRequest("Blob.AttachOnDocument") .param("document", "/default-domain/workspaces/testWorkspaceSUPNXP18115/myTestFile1") .input(fileBlob).execute();
- This uploads the file and attach it to the document using a temporary name (.tmp).
- Using the following CURL command it works fine:
curl -X POST -F request='{"params":{"document":"/default-domain/workspaces/testWorkspaceSUPNXP18115/myTestFile1"},"context":{}}' -F input=@breakout2600_2.png -u Administrator:Administrator http://localhost:8080/nuxeo/site/automation/Blob.Attach
- duplicates
-
JAVACLIENT-74 Fix/check filename encoding issue in multipart
- Resolved
- is related to
-
NXP-21642 Decode UTF-8 filenames from a multipart request to automation
- Resolved
-
JAVACLIENT-74 Fix/check filename encoding issue in multipart
- Resolved
- is required by
-
NXP-20825 Add unit test to check that filename is correct when attaching blob
- Resolved