thanks, I used your advice to write setInput(new
PathRef("/templates/folder1")) , everything is working fine
and I have everything more clear.
I still have 2 questions, the first, I would like to split
the code, instead have all in just one line of code, I would
like to have it in different line, but I cannot not divide
it because the methods set, setInput are not for the type
session. Any idea who can I split this line of code?
session.newRequest("Document.Create").setInput(root).set("type
", "File").set("name", "myfile").set("properties",
"dc:title=My File").execute();
Second question, In the Automation client code example, when
we have to upload a file, we have to specify the type of
file, in the example, we are uploading a txt file. To be
more specific, in the line of code "
fb.setMimeType("text/xml") ". I guess that the parameter
that we pass into this method is a specific key word, I
would like to know what are all the key word available, I am
going to need to upload pdf, word, excel files.
// Upload The file
File file = new
File("/home/fguerrero/My_documents/textFile.txt");
FileBlob fb = new FileBlob(file);
fb.setMimeType("text/xml");
// uploading a file will return null since we used
HEADER_NX_VOIDOP
session.newRequest("Blob.Attach").setHeader(
Constants.HEADER_NX_VOIDOP,
"true").setInput(fb)
.set("document",
"/domain1/sections/section2/folder2/file2").execute();
Thanks in advance for all the help that I have received in
this forum
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/