* @throws Exception
*/
public Data uploadFiles(HttpServletRequest request, long contentId) throws Exception {
setDirInfo("N");
Data files = fileUtil.uploadFiles( request,
dirUtil.getDirType() + "/" + dirUtil.getPhyPath(),
dirUtil.getDirId()
);
if( files.isNull()) {
return new Data();
}
files.add(0, "contentId", contentId);
int size = files.size();
for(int i =0; i < size; i++) {
files.add(i, "fileType", "A");
}
files = fileService.insertFile(files);
Data param = new Data();
for(int i = 0; i< size; i++) {
param.add(i, "fileId", files.getString(i, "fileId"));
param.add(i, "fileName", files.getString(i, "fileName"));
}
files = null;
return param;