cancel
Showing results for 
Search instead for 
Did you mean: 

File upload to Nuxeo server from Android mobile

Bob_James
Champ on-the-rise
Champ on-the-rise

// Get The Root Document root = (Document) session.newRequest("Document.Fetch").set( "value", "/").execute(); // Create a File Document session.newRequest("Document.Create").setInput(root).set("type", "File").set( "name", "myfile").set("properties", "dc:title=My File").execute();

// Upload The file
File file = getTheFileToUpload();
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", "/myfile").execute();

File content not creating in Nuxeo server Error message:"Binary request not supported"

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

Please edit your message to introduce clearly what you're doing and the problem you encounter.

mathias_lin
Star Contributor
Star Contributor

Duplicate to https

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.