[MNT-2624] Correct mimetype not identified when uploading via Explorer or ftp Created: 20-Jun-12 Updated: 06-Mar-14 Resolved: 11-Nov-13 |
|
Status: | Closed |
Project: | Service Packs and Hot Fixes |
Component/s: | Tika, POI, and Metadata Extraction |
Affects Version/s: | 4.0.1 |
Fix Version/s: | 4.2.1 |
Type: | Service Pack Request | ||
Reporter: | Marco Mancuso [X] (Inactive) | Assignee: | Closed Bugs (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | 0 minutes | ||
Time Spent: | 7 hours | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||
Bug Priority: |
|
||||||||||||||||||||
ACT Numbers: | 45804 |
||||||||||||||||||||
Build Location: | http://releases.alfresco.com/Enterprise%204.2/4.2.1/build-00050/ |
Description |
[Steps to reproduce] [ Actual Result] [Expected result] [Notes] |
Comments |
Comment by Amin Zamani (Inactive) [ 27-Jun-12 ] |
Hallo, our customer is waiting of a solution for this problem. Can you tell me the state ? |
Comment by Amin Zamani (Inactive) [ 27-Jun-12 ] |
By the way: If you upload the files through Alfresco Explorer the same problem appears. |
Comment by Andrew Hunt [X] (Inactive) [ 27-Jun-12 ] |
This looks like it is not a problem with the registering of the additional mimetypes. |
Comment by Amin Zamani (Inactive) [ 28-Jun-12 ] |
Hi, thank you very much for the answer. But that does not resolve the problem. You have received my testfiles. So where is the Problem? I have done everything right. As I told you, Share does not have the problem. So how can we fix it? Why does it work in Share but not in Alfresco? I know that the extra extensions are imported and that they also show up in Explorer content-type drop-down. So there must be a difference between Share and Alfresco Explorer. Share realizes the correct mime-type but in Alfresco Explorer not. I thank you very much for solving this problem, because our customer is waiting. The problem also exists by FTP upload or CIFS upload. It seems that only Share is correctly working. Best regards |
Comment by Andrew Hunt [X] (Inactive) [ 28-Jun-12 ] |
Amin - You are right, this does not solve the problem - this issue has been assigned to our engineering team to look at. |
Comment by Amin Zamani (Inactive) [ 28-Jun-12 ] |
Hi Andrew, thank you very much! Of course I want to continue! We have to fix this problem. Thank you very much! |
Comment by Nick Burch (Inactive) [ 04-Jul-12 ] |
The issue relates to the fact that Tika has a full mimetype hierarchy, while Alfresco (which predates Tika by a long way) currently only has a flat list. This means that in Tika you can say "this is based on a zip" or "this is based on a FooBar which in turn is based on XML", that hierarchy information isn't defined in Alfresco, so can't be used to help direct detection. (There has been some talk of moving the Alfresco MimeType model to be based on the Tika one, to gain advantages of things like this, and also to benefit from the wider variety of mimetypes defined in Apache Tika, but this work has so far not been a high enough priority to be tackled) What I'd suggest you do is define the mimetype to both Alfresco and Apache Tika. By defining it in Alfresco, it'll be available in dropdowns, descriptions etc. By defining it to Apache Tika, Alfresco will be able to use the full details of it via Tika, and then any other Tika using applications you may have (eg other content systems, standalone SOLR installs etc) will be able to correctly handle and detect your files. To do this, there are two steps. The first is to create a custom Tika extension mimetypes file, that knows about your files. The second is to contribute this to Apache Tika, so it gets included upstream and will be present as standard going forward |
Comment by Nick Burch (Inactive) [ 04-Jul-12 ] |
If you drop the attached jar into your classpath, then detection should work correctly. Also attached is the custom-mimetypes file in the jar To test it, grab the latest copy of the Tika-App jar, then run with something like $ java -classpath tika-app-1.1.jar:custom-tika-mimetypes.jar --detect --detect Neueintritt\ Mitarbeiter.bpm This allows you to check that the detection is working correctly |
Comment by Nick Burch (Inactive) [ 04-Jul-12 ] |
As these seem to be fairly standard file types, I've added them to the core of Apache Tika as part of TIKA-949. Once the version of Apache Tika included in Alfresco is upgraded to Tika 1.2 or newer (likely shortly after Tika 1.2 is released), the fix will be present as standard. |
Comment by Alfresco QA Team (Inactive) [ 11-Nov-13 ] |
Successfully verified against Alfresco Enterprise v4.2.1 |