Commit dc42eb71 by songxiang

注释没用的代码

parent b975c2a8
...@@ -815,28 +815,28 @@ public class ImageUtils { ...@@ -815,28 +815,28 @@ public class ImageUtils {
* 源文件上传后的路径,主要用于子文件上传时对应http文件路径 * 源文件上传后的路径,主要用于子文件上传时对应http文件路径
*/ */
public static UploadResultInfo toWebp(String fileUrl) { public static UploadResultInfo toWebp(String fileUrl) {
String fileNameAll = FileUtils.getFileNameAll(fileUrl); // String fileNameAll = FileUtils.getFileNameAll(fileUrl);
String localFilePath = FilePathConst.DOWNLOAD_PATH + fileNameAll; // String localFilePath = FilePathConst.DOWNLOAD_PATH + fileNameAll;
FileUtils.downloadFileFromUrl(fileUrl, localFilePath); // FileUtils.downloadFileFromUrl(fileUrl, localFilePath);
String tragetPath = null; // String tragetPath = null;
try { // try {
tragetPath = com.dcg.util.ImageUtils.transcodeToWebp(localFilePath, 80); // tragetPath = com.dcg.util.ImageUtils.transcodeToWebp(localFilePath, 80);
} catch (Exception e) { // } catch (Exception e) {
LOGGER.error("【IMAGE】图片转换成webp失败:" + e.getMessage(), e); // LOGGER.error("【IMAGE】图片转换成webp失败:" + e.getMessage(), e);
return null; // return null;
} // }
if (StringUtils.isEmpty(tragetPath)) { // if (StringUtils.isEmpty(tragetPath)) {
return null; // return null;
} // }
try { // try {
return OssUtils.uploadLocalFile4Child(tragetPath, fileUrl); // return OssUtils.uploadLocalFile4Child(tragetPath, fileUrl);
} catch (Exception e) { // } catch (Exception e) {
LOGGER.error("【IMAGE】图片转换成webp,上传失败:" + e.getMessage(), e); // LOGGER.error("【IMAGE】图片转换成webp,上传失败:" + e.getMessage(), e);
} finally { // } finally {
FileUtils.deleteFile(localFilePath); // FileUtils.deleteFile(localFilePath);
FileUtils.deleteFile(tragetPath); // FileUtils.deleteFile(tragetPath);
} // }
return null; // return null;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment