<?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: Attached file content issue in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23271#M10169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I have found.&lt;/P&gt;&lt;P&gt;1. I am able to reproduce the issue using a simple pdf file.&lt;/P&gt;&lt;P&gt;2. The corruptions appears to occur on upload as the binary stream stored in the database matches the corrupted file.&lt;/P&gt;&lt;P&gt;3. Activiti Enterprise and Activiti Version 6 use a completely different API set and doesnt appear to have the same problem, at least using the new related content api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code itself appears to be correct, the Multipart data element is being pulled directly from the request using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;MultipartFile file = request.getFileMap().values().iterator().next();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then saved to the ACT_GE_BYTEARRAY table as a byte array. The Data is wrong as soon as it hits the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not attempted using any other file, but right now things don't look good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Mar 2017 19:32:20 GMT</pubDate>
    <dc:creator>gdharley</dc:creator>
    <dc:date>2017-03-02T19:32:20Z</dc:date>
    <item>
      <title>Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23267#M10165</link>
      <description>I attached a file with a task and fetched its content using&amp;nbsp;runtime/tasks/{taskId}/attachment/{attachmentId}/contentapi. I am able to save content of text file successfully but for other formats data is not getting&amp;nbsp;saved properly and saved files are getting corrupted.</description>
      <pubDate>Wed, 01 Mar 2017 13:21:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23267#M10165</guid>
      <dc:creator>saurabh_gotharw</dc:creator>
      <dc:date>2017-03-01T13:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23268#M10166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please provide more detail and a unit test. Otherwise there is not much anyone can do for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 13:52:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23268#M10166</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-03-01T13:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23269#M10167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to fetch content of attached files using api call on activiti version 5.22.0. For "text" files, I am able to save content in a local file but for rest of the formats&amp;nbsp;(.pdf/ .jpeg), I am not getting proper content as the local files are getting corrupted and also size of local file is larger than the original file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 04:34:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23269#M10167</guid>
      <dc:creator>saurabh_gotharw</dc:creator>
      <dc:date>2017-03-02T04:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23270#M10168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you elaborate though? I want to know things like, "when I use this file (size, type, etc), the API call works, but then I download the file and &amp;lt;something&amp;gt; happens". Are there any error messages? Does this seem to happen to all files other than text no matter what? Or does it work for smaller/larger files?&lt;BR /&gt;&lt;BR /&gt;-JEarles&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 17:42:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23270#M10168</guid>
      <dc:creator>jearles</dc:creator>
      <dc:date>2017-03-02T17:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23271#M10169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what I have found.&lt;/P&gt;&lt;P&gt;1. I am able to reproduce the issue using a simple pdf file.&lt;/P&gt;&lt;P&gt;2. The corruptions appears to occur on upload as the binary stream stored in the database matches the corrupted file.&lt;/P&gt;&lt;P&gt;3. Activiti Enterprise and Activiti Version 6 use a completely different API set and doesnt appear to have the same problem, at least using the new related content api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code itself appears to be correct, the Multipart data element is being pulled directly from the request using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;MultipartFile file = request.getFileMap().values().iterator().next();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then saved to the ACT_GE_BYTEARRAY table as a byte array. The Data is wrong as soon as it hits the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not attempted using any other file, but right now things don't look good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 19:32:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23271#M10169</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-03-02T19:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23272#M10170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said that this problem will not occur in Activiti Version 6, but is there any possibility that I can get correct&amp;nbsp;content using Activiti Version 5.22 as migrating from version 5.22 to 6 will require major changes for us.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2017 09:35:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23272#M10170</guid>
      <dc:creator>saurabh_gotharw</dc:creator>
      <dc:date>2017-03-03T09:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Attached file content issue</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23273#M10171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Activiti is open source software and maintained by the usr community.&lt;/P&gt;&lt;P&gt;Feel free to generate a fix and issue a pull request.&lt;/P&gt;&lt;P&gt;If you are incapable of unwilling to contribute, you can open a defect on the Activiti Jira here, but there is no guarantee when this will be fixed that way.&lt;/P&gt;&lt;P&gt;Alternatively, if this is really important to you, you could pay someone to fix the issue for you (such as BP3).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/tag/bp3/tg-p"&gt;&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2017 12:37:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/attached-file-content-issue/m-p/23273#M10171</guid>
      <dc:creator>gdharley</dc:creator>
      <dc:date>2017-03-03T12:37:04Z</dc:date>
    </item>
  </channel>
</rss>

