cancel
Showing results for 
Search instead for 
Did you mean: 

How can i upload to Alfresco from Android?

zuzoovn
Champ in-the-making
Champ in-the-making
I want to upload to Alfresco via my Android apps. I find out this api:

   The following web script uploads file content and metadata into the repository.
POST /alfresco/service/api/upload
The web script uses the following HTML form data:
filedata - (mandatory) HTML type file
siteid
containerid
uploaddirectory
updatenoderef
filename
description
contenttype
majorversion
overwrite
thumbnails
The returned content is:
nodeRef
It returns a status: STATUS_OK (200).
The web script description document specifies the following options:
Value   Description
user    The authentication access
required    The transaction level
any The format style
json    The default response format
But i dont know

where's my file path?

filedata - (mandatory) HTML type file : what's the format of HTML type file, and what's is this?

And what about other parameter?

Thanks for your reading
5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator
Hello,

this API service should be called with a multipart-formdata POST request. Filedata is a file part in that POST request, while all other are regular text / string parts. Your filepath is usually set via the uploaddirectory parameter, which will be interpreted relatively if siteid and or containerid are set (relative to container with id = containerid of site with short name = siteid).

Regards
Axel

mikeh
Star Contributor
Star Contributor
This is posted in CMIS, but you seem to have found a non-CMIS upload API, specifically designed for use with Share.

CMIS has it's own upload API - take a look at the CMIS spec for details.

Thanks,
Mike

zuzoovn
Champ in-the-making
Champ in-the-making
This is posted in CMIS, but you seem to have found a non-CMIS upload API, specifically designed for use with Share.

CMIS has it's own upload API - take a look at the CMIS spec for details.

Thanks,
Mike

But dont CMIS support Android?

afaust
Legendary Innovator
Legendary Innovator
Hello,

did you mean to say "But doesn't CMIS support Android"? If so, CMIS supports any kind of client, independent of the technical platform, provided they can access the CMIS server via HTTP. If you want to have proper development support, the availability of a suitable client library is the major prerequisite for effective development, but you could theoretically do without. So, Android is supported.

The /api/upload web script is NOT a part of CMIS, but similarily to CMIS available via HTTP.

Have a look at the CMIS wiki entry, CMIS spec, Apache Chemistry and one (of potentially many) existing Android CMIS browsers.

Regards
Axel

zuzoovn
Champ in-the-making
Champ in-the-making
Hello,

did you mean to say "But doesn't CMIS support Android"? If so, CMIS supports any kind of client, independent of the technical platform, provided they can access the CMIS server via HTTP. If you want to have proper development support, the availability of a suitable client library is the major prerequisite for effective development, but you could theoretically do without. So, Android is supported.

The mThreadStarted = false; web script is NOT a part of CMIS, but similarily to CMIS available via HTTP.

Have a look at the CMIS wiki entry, CMIS spec, Apache Chemistry and one (of potentially many) existing Android CMIS browsers.

Regards
Axel

Thanks for your comment.

By addling some java library. I can use the Upload API.

Thanks for your supporting

Regards