[ALF-21813] MIME type does not change when the content is changed Created: 29-Dec-16 Updated: 24-Mar-20 Resolved: 26-Jan-17
|Fix Version/s:||Community Edition 201702 GA|
|Security Level:||external (External user)|
|Reporter:||Douglas Cassiano Rodrigues Paes||Assignee:||Closed Issues|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Date of First Response:|
When an user wants to upload a new version for an existing document using a different mimetype, Alfresco does not update the extension or the mime type property.
I tried to apply the solution presented https://github.com/keensoft/alfresco-summit-2014/tree/master/10-enhancements/08-rename-on-change-ext/rename-on-change-ext-repo
Uploading a PDF
Because of that, there is no way to detect the change with the behaviour.
Based on that, I have back ported the upload webscript controller from 5.2, and made some changes, and now, combining the behaviour AND the upload controller, it's working, having Alfresco correctly setting both the extension and the mime type property.
I have a sample project that can be used to simulate the problem I'm describing here. I'm attaching it to this issue.
This problem is related with the issue reported at https://issues.alfresco.com/jira/browse/MNT-16328
All the changes I made on the upload.js file are marked by comments starting with DGCloud.
The exptected behaviour:
The current behaviour:
I hope this can help you to understand the problem.
Notes from the reporter:
|Comment by Richard Esplin [X] (Inactive) [ 19-Jan-17 ]|
Thank you for reporting this issue. Can you reproduce it on the latest release of Community Edition?
Your report suggests that it is fixed in 5.2, so is this issue simply documenting the problem for other people and we can close it?
|Comment by Richard Esplin [X] (Inactive) [ 26-Jan-17 ]|
Douglas explained to me that he didn't test this in 5.2, but the code that addresses it appears to be in 5.2.
This was fixed as part of a service pack (see
|Comment by Douglas Cassiano Rodrigues Paes [ 24-Apr-17 ]|
@resplin I am back just to let you know that everything is worked ok on 201702-GA.
I have just tried uploading a new PDF over a DOCX file, and both mime type and extension got changed.