mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
127427 jkaabimofrad: RA-1052: Modified the upload API so that the failure of the async request to create a rendition wouldn't fail the upload. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127445 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2229,8 +2229,6 @@ public class NodesImpl implements Nodes
|
||||
|
||||
try
|
||||
{
|
||||
List<ThumbnailDefinition> thumbnailDefs = getThumbnailDefs(renditionNames);
|
||||
|
||||
// Map the given properties, if any.
|
||||
if (qnameStrProps.size() > 0)
|
||||
{
|
||||
@@ -2265,9 +2263,23 @@ public class NodesImpl implements Nodes
|
||||
}
|
||||
|
||||
// Create a new file.
|
||||
Node fileNode = createNewFile(parentNodeRef, fileName, nodeTypeQName, content, properties, parameters);
|
||||
final Node fileNode = createNewFile(parentNodeRef, fileName, nodeTypeQName, content, properties, parameters);
|
||||
|
||||
requestRenditions(thumbnailDefs, fileNode);
|
||||
// RA-1052
|
||||
try
|
||||
{
|
||||
List<ThumbnailDefinition> thumbnailDefs = getThumbnailDefs(renditionNames);
|
||||
requestRenditions(thumbnailDefs, fileNode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Note: The log level is not 'error' as it could easily fill out the log file, especially in the Cloud.
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
// Don't throw the exception as we don't want the the upload to fail, just log it.
|
||||
logger.debug("Asynchronous request to create a rendition upon upload failed: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return fileNode;
|
||||
|
||||
|
Reference in New Issue
Block a user