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

Commit d593f722 authored by zhanggb's avatar zhanggb

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

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