|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.webCtrls; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponse; | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.dyFile.FileConstant; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Value("${dy.webFile.supportedFileTypes}") | 
|---|
|  |  |  | private String supportedFileTypes ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //视频的缩略图的扩展名 | 
|---|
|  |  |  | private static final String VideoZipPicFileType = "jpg"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 上传照片图片文件 (当前只对png jpg格式图片支持缩略图) | 
|---|
|  |  |  | * @param file web端上传文件的post对象 | 
|---|
|  |  |  | 
|---|
|  |  |  | frVo.fileNameHash, | 
|---|
|  |  |  | fileNameGrp[0], | 
|---|
|  |  |  | fileNameGrp[1], | 
|---|
|  |  |  | frVo.getFileWebPath(), | 
|---|
|  |  |  | (frVo.getFileWebUrl() + frVo.getFileWebPath()), | 
|---|
|  |  |  | fileOp.getImgFileZipPath(frVo.getFileWebUrl() + frVo.getFileWebPath()), | 
|---|
|  |  |  | fileOp.getFileZipPath(frVo.getFileWebUrl() + frVo.getFileWebPath()), | 
|---|
|  |  |  | frVo.fileWebDownloadPath + id) ; | 
|---|
|  |  |  | return  BaseResponseUtils.buildSuccess(fvo) ; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | 
|---|
|  |  |  | frVo.fileNameHash, | 
|---|
|  |  |  | fileNameGrp[0], | 
|---|
|  |  |  | fileNameGrp[1], | 
|---|
|  |  |  | frVo.getFileWebPath(), | 
|---|
|  |  |  | frVo.getFileWebUrl() + frVo.getFileWebPath(), | 
|---|
|  |  |  | null, | 
|---|
|  |  |  | frVo.fileWebDownloadPath + id) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | frVo.fileNameHash, | 
|---|
|  |  |  | fileNameGrp[0], | 
|---|
|  |  |  | fileNameGrp[1], | 
|---|
|  |  |  | frVo.getFileWebPath(), | 
|---|
|  |  |  | frVo.getFileWebUrl() + frVo.getFileWebPath(), | 
|---|
|  |  |  | null, | 
|---|
|  |  |  | fileOp.getFileZipPath(frVo.getFileWebUrl() + frVo.getFileWebPath(), VideoZipPicFileType), | 
|---|
|  |  |  | frVo.fileWebDownloadPath + id) ; | 
|---|
|  |  |  | return  BaseResponseUtils.buildSuccess(fvo) ; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | 
|---|
|  |  |  | Long id = this.saveFileInfo(fileNameGrp[0], fileNameGrp[1], fileMainName, frVo.fileNameHash, frVo.fileWebPath); | 
|---|
|  |  |  | FileVo fvo = new FileVo(id, | 
|---|
|  |  |  | frVo.fileNameHash, | 
|---|
|  |  |  | fileNameGrp[0], fileNameGrp[1], | 
|---|
|  |  |  | fileNameGrp[0], | 
|---|
|  |  |  | fileNameGrp[1], | 
|---|
|  |  |  | frVo.getFileWebPath(), | 
|---|
|  |  |  | frVo.getFileWebUrl() + frVo.getFileWebPath(), | 
|---|
|  |  |  | null, | 
|---|
|  |  |  | frVo.fileWebDownloadPath + id) ; | 
|---|