Hello everyone,
Is it possible to upload a file by just blob or byte [] instead of the file itself ???
See the example below:
private Document exportNuxeo() throws IOException {
Document doc = new Document("file", "File");
doc.set("dc:title", "Documento 1");
doc = nuxeoClient.repository().createDocumentByPath("/camara.leg/workspaces/", doc);
Document docCriado = nuxeoClient.repository().fetchDocumentByPath("/camara.leg/workspaces/file");
Blob fileBlob = new Blob(new File("c:\\Desenvolvimento\\doc-nuxeo\\teste.pdf"));
nuxeoClient.automation().newRequest("Blob.AttachOnDocument").param("document", docCriado).input(fileBlob)
.execute();
return doc;
}
Blob fileBlob = new Blob(new File("c:\\Desenvolvimento\\doc-nuxeo\\teste.pdf"));
Instead of being the File object being, I use a Blob or byte []
Because I will need to migrate multiple files from the sql server database to nuxeo....
att
Ana Paula Lopes Araújo