Thanks for the link, now I have the package.
In the next code, in the line
request.setInput((OperationInput) fb); I am getting a error
when I try to run the applications, it tells me that it is
not possible to cast a InputStreamBlob into a
OperationInput, I have also tried to cast to Blob, Blobs,
StreamBlob and not cast at all, but anything works. Any idea
how can I pass my InputStreamBlob.
// Upload The file
File file = new
File("/home/fguerrero/My_documents/testFile.pdf");
byte[] bytes=getBytesFromFile(file);
ByteArrayInputStream streamedFile= new
ByteArrayInputStream(bytes);
InputStreamBlob fb = new InputStreamBlob
(streamedFile);
fb.setMimeType("pdf");
// uploading a file will return null since we used
HEADER_NX_VOIDOP
OperationRequest
request=session.newRequest("Blob.Attach");
request.setHeader(Constants.HEADER_NX_VOIDOP,
"true");
request.setInput((OperationInput) fb);
request.set("document",
"/domain1/sections/section3/folder3/file2");
request.execute();
Thanks for all your help. :)
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/1/