记得上下班打卡 | git大法好,push需谨慎

Commit 11984444 authored by zhanggb's avatar zhanggb

~revert:xuper upload image:临时文件名称处理;

parent ddf6a58b
...@@ -169,14 +169,7 @@ public class XuperArtworkBiz { ...@@ -169,14 +169,7 @@ public class XuperArtworkBiz {
//判断类型是否为图片 //判断类型是否为图片
boolean displayIsImageType = GalaxyCommonBiz.isImageType(originalDisplayUrl); boolean displayIsImageType = GalaxyCommonBiz.isImageType(originalDisplayUrl);
if(displayIsImageType){//如果是图片则获取原始宽高 if(displayIsImageType){//如果是图片则获取原始宽高
String imageType = null; File nftUrlFile= galaxyCommonBiz.inputStreamToFile(originalDisplayUrl,IDGenerator.getXuperNftImageCosCode());
if (originalDisplayUrl.lastIndexOf("?") != -1) {
String tempUrl = originalDisplayUrl.substring(0, originalDisplayUrl.lastIndexOf("?"));
imageType = tempUrl.substring(tempUrl.lastIndexOf(".") + 1);
} else {
imageType = originalDisplayUrl.substring(originalDisplayUrl.lastIndexOf(".") + 1);
}
File nftUrlFile= galaxyCommonBiz.inputStreamToFile(originalDisplayUrl,IDGenerator.getXuperNftImageCosCode() + imageType);
displayWidthAndHeight = GalaxyCommonBiz.getImageWidthAndHeight(nftUrlFile.getAbsolutePath()); displayWidthAndHeight = GalaxyCommonBiz.getImageWidthAndHeight(nftUrlFile.getAbsolutePath());
}else{ }else{
displayWidthAndHeight.put("width",290); displayWidthAndHeight.put("width",290);
...@@ -202,14 +195,7 @@ public class XuperArtworkBiz { ...@@ -202,14 +195,7 @@ public class XuperArtworkBiz {
//判断类型是否为图片 //判断类型是否为图片
boolean isImageType = GalaxyCommonBiz.isImageType(originalNftUrl); boolean isImageType = GalaxyCommonBiz.isImageType(originalNftUrl);
if(isImageType){//如果是图片则获取原始宽高 if(isImageType){//如果是图片则获取原始宽高
String imageType = null; File nftUrlFile= galaxyCommonBiz.inputStreamToFile(originalNftUrl,IDGenerator.getXuperNftImageCosCode());
if (originalDisplayUrl.lastIndexOf("?") != -1) {
String tempUrl = originalDisplayUrl.substring(0, originalDisplayUrl.lastIndexOf("?"));
imageType = tempUrl.substring(tempUrl.lastIndexOf(".") + 1);
} else {
imageType = originalDisplayUrl.substring(originalDisplayUrl.lastIndexOf(".") + 1);
}
File nftUrlFile= galaxyCommonBiz.inputStreamToFile(originalNftUrl,IDGenerator.getXuperNftImageCosCode() + imageType);
HashMap<String,Integer> widthAndHeight = GalaxyCommonBiz.getImageWidthAndHeight(nftUrlFile.getAbsolutePath()); HashMap<String,Integer> widthAndHeight = GalaxyCommonBiz.getImageWidthAndHeight(nftUrlFile.getAbsolutePath());
int width = widthAndHeight.get("width").intValue(); int width = widthAndHeight.get("width").intValue();
int height = widthAndHeight.get("height").intValue(); int height = widthAndHeight.get("height").intValue();
......
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