mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
changes in image size
This commit is contained in:
@ -25,9 +25,7 @@ class UpdateJuniorProfile(viewsets.ViewSet):
|
||||
request_data = request.data
|
||||
image = request.data.get('image')
|
||||
image_url = ''
|
||||
img = Image.open(image)
|
||||
width, height = img.size
|
||||
if width == NUMBER['zero'] or height == NUMBER['zero']:
|
||||
if image.size == NUMBER['zero']:
|
||||
return custom_error_response(ERROR_CODE['2035'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
if image:
|
||||
filename = f"images/{image.name}"
|
||||
|
Reference in New Issue
Block a user