04-19-2015 07:09 PM
         String urlString = "http://'+ipaddress+':8080/alfresco/service/api/upload?alf_ticket="
               + authTicket;
         System.out.println("The upload url:::" + urlString);
         HttpClient client = new HttpClient();
         PostMethod mPost = new PostMethod(urlString);
         // File f1 =fileobj;
         Part[] parts = {
               new FilePart("filedata", filename, fileobj, filetype, null),
               new StringPart("filename", filename),
               new StringPart("contenttype", "rs:invoiceDoc" ),
               new StringPart("description", description),
               new StringPart("rs:itemName","Item1,Item2"),
               new StringPart("rs:vendor","sample vendor"),
               // modify this according to where you wanna put your content
               new StringPart("siteid", siteid),
               new StringPart("containerid", "documentLibrary"),
         // new StringPart("uploaddirectory", "/Company Home")
         };
         mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost
               .getParams()));
         int statusCode1 = client.executeMethod(mPost);
new StringPart("rs:itemName","Item1,Item2")04-20-2015 03:02 AM
04-21-2015 07:01 AM
04-20-2015 09:49 AM
               new StringPart("rs:itemName","Item1,Item2"),
               new StringPart("rs:vendor","sample vendor"),
               new FilePart("filedata", filename, fileobj, filetype, null),
               new StringPart("filename", filename),
               new StringPart("contenttype", "rs:invoiceDoc" ),
               new StringPart("description", description),
04-21-2015 06:28 AM
04-28-2015 09:42 AM
04-29-2015 01:12 AM
04-29-2015 03:51 AM
05-04-2015 11:23 PM
04-30-2015 07:08 AM
 
					
				
				
			
		
Tags
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.