留言板

FileEntry 0 bytes

thumbnail
Rocco Piliero,修改在7 年前。

FileEntry 0 bytes

New Member 帖子: 7 加入日期: 16-11-12 最近的帖子
Hi,
I'm using liferay 6.2 portal ga4 and I have a problem with files added programmatically in document library. When I read a file from tomcat temp folder and save it in document library, sometimes it's correct and sometimes it becomes a zero bytes file.
I upload the file with a jquery script and every time the file uploaded in tomcat temp has the right dimensions. Once I uploaded it in temporary folder, I add it in Document Library in this way:
                FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folderUser.getRepositoryId(),
                        folderUser.getFolderId(), file.getFileName(), file.getContentType(), file.getFileName(), description,
                        changelog, fileTmp, serviceContextFiles);

The statements completes with no error and logs are ok too, but sometimes the fileEntry I have created has 0 bytes instead that the right dimension.
Can someone help me?
Thank you,
smxworld