Browse Source

将获取文件的接口做额外的处理6

Yangzw 1 month ago
parent
commit
a0fbf79581

+ 2 - 1
feifan-framework/feifan-common/src/main/java/cn/newfeifan/mall/framework/common/util/servlet/ServletUtils.java

@@ -111,7 +111,8 @@ public class ServletUtils {
             long lpos= flens[1].length()>0?Long.valueOf(flens[1]):sf.length()-1; //表示文件读取文件大小
 
             rinfo.skipLenth=fpos;
-            rinfo.content_Length=lpos-fpos+1;
+//            rinfo.content_Length=lpos-fpos+1;
+            rinfo.content_Length=sf.length();
             rinfo.content_Range=ranplits[0]+" "+fpos+"-"+lpos+"/"+sf.length();
         }
         return rinfo;