cancel
Showing results for 
Search instead for 
Did you mean: 

lost word document file's mime type when uploading new version.

ryo39
Confirmed Champ
Confirmed Champ

Hi, I downloaded and started using alfresco-content-repository-community:6.2.0-ga.
I have a question. When I add a word document(.docx) to Alfresco, it is recognized as Mime-type: Word 2007. Then I choose 'Offline edit' and upload new version after editing.
However after uploading new version(https://docs.alfresco.com/5.2/tasks/library-item-upload.html.), the Mime-type is changed to Binary File(Octet stream) .It happens same for Power point.
I tried it on Chrome and Edge, but the result was the same for both.
Do I need to do any special settings?

imageimage

1 ACCEPTED ANSWER

ryo39
Confirmed Champ
Confirmed Champ

To protect my system from corruption of mime-type by uploading from a non-office installed Windows PC, I made a following windows registory file(.reg) and I decided to ask windows users of my colleague write the registry.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\.docx]
"Content Type"="application/vnd.openxmlformats-officedocument.wordprocessingml.document"

[HKEY_CURRENT_USER\Software\Classes\.docm]
"Content Type"="application/vnd.ms-word.document.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.dotx]
"Content Type"="application/vnd.openxmlformats-officedocument.wordprocessingml.template"

[HKEY_CURRENT_USER\Software\Classes\.doc]
"Content Type"="application/msword"

[HKEY_CURRENT_USER\Software\Classes\.xlsx]
"Content Type"="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

[HKEY_CURRENT_USER\Software\Classes\.xlsm]
"Content Type"="application/vnd.ms-excel.sheet.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.xlt]
"Content Type"="application/vnd.ms-excel"

[HKEY_CURRENT_USER\Software\Classes\.xls]
"Content Type"="application/vnd.ms-excel"

[HKEY_CURRENT_USER\Software\Classes\.pptx]
"Content Type"="application/vnd.openxmlformats-officedocument.presentationml.presentation"

[HKEY_CURRENT_USER\Software\Classes\.pptm]
"Content Type"="application/vnd.ms-powerpoint.presentation.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.potx]
"Content Type"="application/vnd.openxmlformats-officedocument.presentationml.template"

[HKEY_CURRENT_USER\Software\Classes\.potm]
"Content Type"="application/vnd.ms-powerpoint.template.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.ppt]
"Content Type"="application/vnd.ms-powerpoint"

[HKEY_CURRENT_USER\Software\Classes\.csv]
"Content Type"="text/csv"

View answer in original post

5 REPLIES 5

ryo39
Confirmed Champ
Confirmed Champ

PS : I run my alfresco site using docker-compose.

ryo39
Confirmed Champ
Confirmed Champ

This is the file I used for test. Nobody encountered such behavior?

Abcde.docx 

afaust
Legendary Innovator
Legendary Innovator

I have used the file provided by you and could not reproduce the issue (also running within Docker). In general, I am familiar with this kind of behaviour in cases where the file extension is not properly set, e.g. when a user has renamed the file in Alfresco to remove the extension and then uploaded a new version, or when the file extension has been removed on the file system and then the new version was uploaded from that file.

P.S.: It's interesting to see a screenshot of the Japanese UI and how much 外来語 is being used even for simple terms like "size" for which there surely must be suitable Japanese terms (just like 名前 is used for "name" instead of some English-sounding term). Though I am learning Japanese (very much beginner level), I had not yet considered trying out the Japanese localisation of Alfresco.

ryo39
Confirmed Champ
Confirmed Champ

Thank you for your reply. And I'm sorry for the late reply.
I investigated this issue and found that it only occurs on Windows.
And I found that when browser uploads using a new version dialog, on Windows it gets the mime-type from the registry.
I have office2019 installed on my Windows, but I didn't have the following registry (not sure why).
<< HKEY_CLASSES_ROOT \ <extension> \ Content Type >>
Alfresco seems to trust mime-type from the browser when uploading a new version?
I wondered why Alfresco doesn't check the mime-type of the file on the server side.

Best regards,

ryo

ryo39
Confirmed Champ
Confirmed Champ

To protect my system from corruption of mime-type by uploading from a non-office installed Windows PC, I made a following windows registory file(.reg) and I decided to ask windows users of my colleague write the registry.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\.docx]
"Content Type"="application/vnd.openxmlformats-officedocument.wordprocessingml.document"

[HKEY_CURRENT_USER\Software\Classes\.docm]
"Content Type"="application/vnd.ms-word.document.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.dotx]
"Content Type"="application/vnd.openxmlformats-officedocument.wordprocessingml.template"

[HKEY_CURRENT_USER\Software\Classes\.doc]
"Content Type"="application/msword"

[HKEY_CURRENT_USER\Software\Classes\.xlsx]
"Content Type"="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

[HKEY_CURRENT_USER\Software\Classes\.xlsm]
"Content Type"="application/vnd.ms-excel.sheet.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.xlt]
"Content Type"="application/vnd.ms-excel"

[HKEY_CURRENT_USER\Software\Classes\.xls]
"Content Type"="application/vnd.ms-excel"

[HKEY_CURRENT_USER\Software\Classes\.pptx]
"Content Type"="application/vnd.openxmlformats-officedocument.presentationml.presentation"

[HKEY_CURRENT_USER\Software\Classes\.pptm]
"Content Type"="application/vnd.ms-powerpoint.presentation.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.potx]
"Content Type"="application/vnd.openxmlformats-officedocument.presentationml.template"

[HKEY_CURRENT_USER\Software\Classes\.potm]
"Content Type"="application/vnd.ms-powerpoint.template.macroEnabled.12"

[HKEY_CURRENT_USER\Software\Classes\.ppt]
"Content Type"="application/vnd.ms-powerpoint"

[HKEY_CURRENT_USER\Software\Classes\.csv]
"Content Type"="text/csv"