This commit is contained in:
caiwx86 2023-04-01 14:15:28 +08:00
parent 3bad7f3e90
commit a33831ef02

View File

@ -217,10 +217,10 @@ class fileUtils:
return size
@classmethod
def ver_file(cls,file_path,type):
def ver_file(cls,file_path,type,min_size=1):
time.sleep(0.1)
file_size_unit = cls.size(file_path,unit="kb")
if type == "image" and int(cls.size(file_path)) > 100:
if type == "image" and int(cls.size(file_path)) > min_size:
#验证是否是图像
try:
img = Image.open(file_path)