|
|
@ -18,17 +18,34 @@ def file_validation(image, name): |
|
|
|
res1 = check_png_ext(image) |
|
|
|
res2 = check_pdf_ext(image) |
|
|
|
if res == True or res1 == True or res2 == True: |
|
|
|
width, height, size = details_of_image(image) |
|
|
|
if width > 49 or height > 49 or size > 65 and image: |
|
|
|
val = checking_image(image, "Circular", |
|
|
|
"circular_image", name) |
|
|
|
if val == True: |
|
|
|
return False, 2 |
|
|
|
else: |
|
|
|
return True |
|
|
|
return True |
|
|
|
else: |
|
|
|
val = checking_image(image, "Circular", |
|
|
|
"circular_image", name) |
|
|
|
return False, 1 |
|
|
|
# if res== True: |
|
|
|
# pass |
|
|
|
# else: |
|
|
|
# width, height, size = details_of_image(image) |
|
|
|
# if width > 49 or height > 49 or size > 65 and image: |
|
|
|
# val = checking_image(image, "Circular","circular_image", name) |
|
|
|
# if val: |
|
|
|
# return False, 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if res2 == True: |
|
|
|
# pass |
|
|
|
# else: |
|
|
|
# width, height, size = details_of_image(image) |
|
|
|
# if width > 49 or height > 49 or size > 65 and image: |
|
|
|
# val = checking_image(image, "Circular", |
|
|
|
# "circular_image", name) |
|
|
|
# if val == True: |
|
|
|
# return False, 2 |
|
|
|
# else: |
|
|
|
# return True |
|
|
|
# else: |
|
|
|
# val = checking_image(image, "Circular", |
|
|
|
# "circular_image", name) |
|
|
|
if res == False: |
|
|
|
ret = res |
|
|
|
elif res1 == False: |
|
|
|