cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading file to nuxeoserver from android

Ravi_Gupta
Champ in-the-making
Champ in-the-making

Hi All, While uploading file from Android using "nuxeo-Android-Connector" i'm getting Exception like "Binary request are not supported". I'm resceiving this exception from defaultsession.java file of nuxeo-android-connector package. i'm using "Nuxeo Android simple client project" 4.0.0 Please help me for solving the issue.

12 REPLIES 12

Julien_Carsique
Elite Collaborator
Elite Collaborator

Hello,

Ravi_Gupta
Champ in-the-making
Champ in-the-making

alt text alt text

alt text

Hello Julien Carsique,

Ravi_Gupta
Champ in-the-making
Champ in-the-making

I have downloaded the code from nuxeo site version is 5.4

Thierry_Delprat
Confirmed Champ
Confirmed Champ

Hi,

You should have a look at the sample application. Post (binary upload) is supported, but not via a direct Automation call.

There are mainly 2 reasons for that :

  • Android SDK does not provide native support for Multipart encoding (and I was too lazy to rewrite one)
  • Putting all binary data in the same request may not be very effective from a network point of view ( at least from a mobile device)

That's why in the sample client and application, the binary resources are uploaded separately and simply referenced in the Automation call. This means the cinematic is :

  • you do simple Http Post on /automation/batch/upload for each file
  • you call the automation operation using the batchId used for upload

You can take a look at BlobWidgetWrapper that is used to have a file upload widget.

Hope this helps.

Tiry

Hi Thierry Delprat,

Thierry_Delprat
Confirmed Champ
Confirmed Champ

Hi,

The BlobWidgetWrapper is part of the nuxeo-android-connector.

There is some documentation about the principles [here][1], but for your specific question the best solution is probably to take a look at the sample code.

=> build nuxeo-android-connector, nuxeo-android-connector-ui and nuxeo-android-sample

you have everything demonstrated inside the sample :

  • view a document
  • edit a document (including blob upload)
  • manage caching
  • ...

Tiry [1]: http://doc.nuxeo.com/x/GoWE

Hi Tiry,

Thierry_Delprat
Confirmed Champ
Confirmed Champ

Doc Url is : http://doc.nuxeo.com/x/GoWE

i'll try to check the build, but the code you need is inside nuxeo-android-connector.

Tiry

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.