AnsweredAssumed Answered

Send file from portlet to webscript

Question asked by rascio on Apr 24, 2009
Latest reply on Apr 29, 2009 by calebmei
hello,
i'm trying to send a file from a portlet to a webscript made for save files in alfresco…
i've a problem with the webscript…the formdata is undefined…i'm thinking that the problem is in the method that send the file at the webscript
HttpClient client = new HttpClient();
      PostMethod filePost = new PostMethod(uri);
      filePost.setRequestHeader("Content-Type", "multipart/form-data");
      Part[] parts = new Part[]{
            new FilePart(file.getName(), file)
         };
      filePost.setRequestEntity(new MultipartRequestEntity(parts, filePost.getParams()));
      filePost.addParameters(params);
      client.executeMethod(filePost);
      byte[] responseBody = filePost.getResponseBody();

can somebody help me??

Outcomes