<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to upload user avatar images to Alfresco Share? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-upload-user-avatar-images-to-alfresco-share/m-p/298721#M251851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after many tests we have located the problem: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MediaType of the "filedata" field on the form was wrong. This field must be of type MediaType.APPLICATION_OCTET_STREAM_TYPE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FormDataMultiPart FormDataMultiPart form = new (); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.field ("username", userName); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.field ("filename", "test.png"); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.bodyPart (new FileDataBodyPart ("filedata" file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;client.resource = WebResource (urlResourceAlfresco); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ClientResponse responseAvatar = webResource.type (MediaType.MULTIPART_FORM_DATA) .post (ClientResponse.class, form); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thumbnail is automatically created when you call to get that image: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;…/alfresco/api/service/node/workspace/SpacesStore/39409759-65b9-49bd-a8b3-37fcbe3b6dc7/content/thumbnails/avatar?c=force &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solved.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 09:56:44 GMT</pubDate>
    <dc:creator>ofnavarro</dc:creator>
    <dc:date>2014-09-03T09:56:44Z</dc:date>
    <item>
      <title>How to upload user avatar images to Alfresco Share?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-upload-user-avatar-images-to-alfresco-share/m-p/298720#M251850</link>
      <description>Hi,we are using the RESTFul Api Function "/alfresco/service/slingshot/profile/uploadavatar" to upload user profile images but they are not shown in Alfresco share.How can we make to create the thumbnail like does the user account edit screen in Alfresco Share?This is the code used for that:File file</description>
      <pubDate>Mon, 01 Sep 2014 17:53:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-upload-user-avatar-images-to-alfresco-share/m-p/298720#M251850</guid>
      <dc:creator>ofnavarro</dc:creator>
      <dc:date>2014-09-01T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload user avatar images to Alfresco Share?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-upload-user-avatar-images-to-alfresco-share/m-p/298721#M251851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after many tests we have located the problem: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MediaType of the "filedata" field on the form was wrong. This field must be of type MediaType.APPLICATION_OCTET_STREAM_TYPE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FormDataMultiPart FormDataMultiPart form = new (); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.field ("username", userName); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.field ("filename", "test.png"); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;form.bodyPart (new FileDataBodyPart ("filedata" file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;client.resource = WebResource (urlResourceAlfresco); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ClientResponse responseAvatar = webResource.type (MediaType.MULTIPART_FORM_DATA) .post (ClientResponse.class, form); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thumbnail is automatically created when you call to get that image: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;…/alfresco/api/service/node/workspace/SpacesStore/39409759-65b9-49bd-a8b3-37fcbe3b6dc7/content/thumbnails/avatar?c=force &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solved.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 09:56:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-upload-user-avatar-images-to-alfresco-share/m-p/298721#M251851</guid>
      <dc:creator>ofnavarro</dc:creator>
      <dc:date>2014-09-03T09:56:44Z</dc:date>
    </item>
  </channel>
</rss>

