| | |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | |
| | | */ |
| | | String folderType = "image"; |
| | | |
| | | @Autowired |
| | | UploadUtil uploadUtil; |
| | | |
| | | public final static List<FileType> EXT_LIST = new ArrayList<FileType>(); |
| | | static { |
| | | EXT_LIST.add(FileType.JPEG); |
| | |
| | | SysUsers user = getSessionUser(); |
| | | |
| | | SysCompany company = WebUtil.getSessionAttribute(HostInterceptor.ATTR_COMPANY); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, company.getComId()); |
| | | Map<String, String> fileMap = uploadUtil.doUpload(request, EXT_LIST, folderType, company.getComId()); |
| | | String callBack = request.getParameter("callBack"); |
| | | String inputId = request.getParameter("inputId"); |
| | | request.setAttribute("callBack", callBack); |