<?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 Upload new version + mime type in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31458#M13339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an empty document. Only metadata are filled.&lt;/P&gt;&lt;P&gt;I want to upload new version of document, e.g. newFile.docx.&lt;/P&gt;&lt;P&gt;It is OK.&lt;/P&gt;&lt;P&gt;But.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The mime type is bin(application/octet-stream).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a bug? Or where is a problem? I'm really confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alfresco Community 5.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Mar 2017 10:07:50 GMT</pubDate>
    <dc:creator>kamilaw_</dc:creator>
    <dc:date>2017-03-31T10:07:50Z</dc:date>
    <item>
      <title>Upload new version + mime type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31458#M13339</link>
      <description>I have an empty document. Only metadata are filled.I want to upload new version of document, e.g. newFile.docx.It is OK.But.&amp;nbsp;The mime type is bin(application/octet-stream).It's a bug? Or where is a problem? I'm really confused.Alfresco Community 5.1</description>
      <pubDate>Fri, 31 Mar 2017 10:07:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31458#M13339</guid>
      <dc:creator>kamilaw_</dc:creator>
      <dc:date>2017-03-31T10:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new version + mime type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31459#M13340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the repository doesn't do a second guess of the mime type if you create a new version.&lt;/P&gt;&lt;P&gt;You say, you have an empty document. Do know the mime type beforehand and are able to set it like you did with the rest of the metadata?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility would be a script executed by a rule on "incoming document".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe an adapted scripts like in&amp;nbsp;&lt;A _jive_internal="true" href="https://community.alfresco.com/thread/228068-alfresco-convert-docx-to-pdf-and-create-a-new-version" rel="nofollow noopener noreferrer"&gt;alfresco - convert docx to pdf and create a new version&lt;/A&gt;&amp;nbsp;could help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 10:17:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31459#M13340</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-03-31T10:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new version + mime type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31460#M13341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank for your answer.&lt;/P&gt;&lt;P&gt;So, Alfresco create a .bin extension and it is bin&amp;nbsp;to the end of days? Hm, not very clever.&lt;/P&gt;&lt;P&gt;I do not know extension beforehand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My solution is a Java class:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ContentReader contentReader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);&lt;BR /&gt;String type = mimetypeService.guessMimetype(null, contentReader);&lt;BR /&gt;String extension = mimetypeService.getExtension(type);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, it's not running with type .accdb or .txt. &amp;nbsp;Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 11:22:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31460#M13341</guid>
      <dc:creator>kamilaw_</dc:creator>
      <dc:date>2017-04-04T11:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new version + mime type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31461#M13342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think alfresco just lacks the mimetype for MS Access accdb files.&lt;/P&gt;&lt;P&gt;/thread/182405-doesnt-alfresco-handle-ms-access-files&lt;/P&gt;&lt;P&gt;&lt;B&gt;Axel Faust&lt;/B&gt;‌ commented on this.&lt;/P&gt;&lt;P&gt;The mimetype service is also able to guess the mimetype from the extension&lt;/P&gt;&lt;P&gt;mimetypeService.getMimetypesByExtension().get(extension);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be not very clever not to check and set the mimetype on new versions, but most likely you change a documents content, not its name and mimetype. So because your case is quite unusual, you won't find a out of the box solution.&lt;/P&gt;&lt;P&gt;I had such a case when metadata was waiting for files from a legacy application and solved it with a incoming rule, executing a short JavaScript...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can add mimetypes to Alfresco:&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/community5.0/tasks/mimetype-add.html" title="http://docs.alfresco.com/community5.0/tasks/mimetype-add.html" rel="nofollow noopener noreferrer"&gt;Adding a MIME type | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 12:01:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31461#M13342</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-04-04T12:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new version + mime type</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31462#M13343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This behaviour was changed in the 201702-GA&amp;nbsp;release (Alfresco Content Repository 5.2.f and&amp;nbsp;Alfresco Share 5.2.e)&lt;/P&gt;&lt;P&gt;Details here&amp;nbsp;&lt;A class="link-titled" href="https://issues.alfresco.com/jira/browse/ALF-21813" title="https://issues.alfresco.com/jira/browse/ALF-21813" rel="nofollow noopener noreferrer"&gt;[ALF-21813] MIME type does not change when the content is changed - Alfresco JIRA&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:17:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/upload-new-version-mime-type/m-p/31462#M13343</guid>
      <dc:creator>douglascrp</dc:creator>
      <dc:date>2017-10-04T18:17:11Z</dc:date>
    </item>
  </channel>
</rss>

