mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ContentData will now force it to 'application/octet-stream'
- The Share UI sets the mimetype to empty string ('') if the mimetype is unknown git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16466 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,6 +29,7 @@ import java.util.Locale;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.util.EqualsHelper;
|
||||
|
||||
@@ -195,6 +196,10 @@ public class ContentData implements Serializable
|
||||
*/
|
||||
public ContentData(String contentUrl, String mimetype, long size, String encoding, Locale locale)
|
||||
{
|
||||
if (mimetype == null || mimetype.length() == 0)
|
||||
{
|
||||
mimetype = MimetypeMap.MIMETYPE_BINARY;
|
||||
}
|
||||
checkContentUrl(contentUrl, mimetype, encoding);
|
||||
this.contentUrl = contentUrl;
|
||||
this.mimetype = mimetype;
|
||||
|
Reference in New Issue
Block a user