cancel
Showing results for 
Search instead for 
Did you mean: 

No Community 4.2.e docs?

fredwolfinger
Champ in-the-making
Champ in-the-making
Hi,

I was wondering where I could find rest API information for Community Edition 4.2.e? I am getting an error trying to upload a file using the rest API and have no idea why:

{
    "status" :
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request."
  }, 
 
  "message" : "11060017 Unexpected error occurred during upload of new content.", 
  "exception" : "org.springframework.extensions.webscripts.WebScriptException - 11060017 Unexpected error occurred during upload of new content.",

The same code works on the 4.0.d version.

Any insight would be greatly appreciated,

Fred
3 REPLIES 3

abarisone
Star Contributor
Star Contributor

jpotts
World-Class Innovator
World-Class Innovator
That is the 4.2 Enterprise Edition documentation. The 4.2 Community Edition documentation page for this particular API call is:
http://docs.alfresco.com/community/topic/com.alfresco.community.doc/references/RESTful-UploadUploadP...

Jeff

kaynezhang
World-Class Innovator
World-Class Innovator
I'm using version 4.2 ,I can upload file correctly,Bellow is my upload code snippet.

         String urlString = "http://127.0.0.1:8080/alfresco/service/api/upload?alf_ticket="
               + authTicket;
         HttpClient client = new HttpClient();

         PostMethod mPost = new PostMethod(urlString);
         Part[] parts = {
               new FilePart("filedata", filename, fileobj, filetype, null),
               new StringPart("filename", filename),
               new StringPart("description", description),
               new StringPart("description", description),
               new StringPart("siteid", "kaynezhang"),
               new StringPart("containerid", "documentLibrary"),
               // new StringPart("uploaddirectory", "/Company Home")
         };
         mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost
               .getParams()));
         int statusCode1 = client.executeMethod(mPost);

which upload rest API are you using ?