mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V4.0-BUG-FIX (4.0.2) to HEAD
34160: Merged V4.0 (V4.0.1) to V4.0-BUG-FIX (4.0.2) 34159: ALF-12725,ALF-13011: Merge V3.4-BUG-FIX (3.4.9) to V4.0 (V4.0.1) 34151: Merged V3.4 (3.4.8) to V3.4-BUG-FIX (3.4.9) 34121: Merged BELARUS/V3.4-BUG-FIX-2012_01_26 to V3.4 (3.4.8) Should have been done in 3.4.7 in ALF-12174 but was not found by Eclipse search 34100: ALF-12948 : Copyright year on "About Alfresco" page is out of date Updated copyright year to 2012. 34150: ALF-10976 (relates to ALF-10412) - Thumbnail mimetype check should have been >= 0 not > 0. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@34184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -157,16 +157,17 @@ public class CreateThumbnailActionExecuter extends ActionExecuterAbstractBase
|
||||
String mimetype = content.getMimetype();
|
||||
if (!registry.isThumbnailDefinitionAvailable(content.getContentUrl(), mimetype, content.getSize(), details))
|
||||
{
|
||||
logger.info("Unable to create thumbnail '" + details.getName() + "' for " +
|
||||
logger.debug("Unable to create thumbnail '" + details.getName() + "' for " +
|
||||
mimetype + " as no transformer is currently available");
|
||||
return;
|
||||
}
|
||||
if (mimetypeMaxSourceSizeKBytes != null)
|
||||
{
|
||||
Long maxSourceSizeKBytes = mimetypeMaxSourceSizeKBytes.get(mimetype);
|
||||
if (maxSourceSizeKBytes != null && maxSourceSizeKBytes > 0 && maxSourceSizeKBytes <= (content.getSize()/1024L))
|
||||
if (maxSourceSizeKBytes != null && maxSourceSizeKBytes >= 0 && maxSourceSizeKBytes < (content.getSize()/1024L))
|
||||
{
|
||||
logger.info("Creation of " + details.getName()+ " thumbnail from '" + mimetype + "' , content is too big ("+(content.getSize()/1024L)+"K >= "+maxSourceSizeKBytes+"K)");
|
||||
logger.debug("Unable to create thumbnail '" + details.getName() + "' for " +
|
||||
mimetype + " as content is too large ("+(content.getSize()/1024L)+"K > "+maxSourceSizeKBytes+"K)");
|
||||
return; //avoid transform
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user