-
Type:
Bug
-
Status: Closed
-
Resolution: No Longer Reproducible
-
Affects Version/s: 6.0.2 RC, 6.0.6 GA
-
Fix Version/s: None
-
Component/s: Documents & Media
-
Labels:None
The unlockResource method in DLWebDAVStorageImpl throws a FileSizeException when dl.webdav.save.to.single.version is set to true and dl.file.max.size is set to a non 0 value
The problem is that the publishFileEntry method in DLWebDAVStorageImpl executes the following line
DLFileEntryLocalServiceUtil.updateFileEntry(
latestFileVersion.getUserId(), latestFileVersion.getGroupId(),
latestFileVersion.getFolderId(), latestFileVersion.getFolderId(),
latestFileVersion.getName(), fileEntry.getTitle(),
fileEntry.getTitle(), fileEntry.getDescription(),
latestFileVersion.getDescription(), true,
fileEntry.getExtraSettings(), null, 0, serviceContext);
Note that it passes in null for the input stream
Later in DLLocalServiceImpl the following code is executed
public void validate(
String fileName, boolean validateFileExtension, InputStream is)
throws PortalException, SystemException {
if ((PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) > 0) &&
((is == null) ||
(is.available() >
PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE))))