+
    2oi                     B    ^ RI HtHt ^ RIHt ^ RItRt. ROtR R ltR# )    )HTTPException
UploadFile)ImageNc                $    V ^8  d   QhR\         /# )   file)r   )formats   "3/var/www/html/photoedit/app/utils/file_validator.py__annotate__r   ;   s     , ,
,    c                   "   V P                   \        9  d   \        R RR7      hV P                  4       G Rj  xL
 pV'       g   \        R RR7      h\	        V4      \
        8  d   \        R RR7      h \        P                  ! \        P                  ! V4      4      pVP                  4        T P                  ^ 4      G Rj  xL
  R#  L  \         d    \        R RR7      hi ; i L$5i)i  zUnsupported image type)status_codedetailNz
Empty filezFile exceeds 10MBzInvalid image fileT)content_typeALLOWED_TYPESr   readlenMAX_FILE_SIZEr   openioBytesIOverify	Exceptionseek)r   contentimages   &  r
   validate_imager   ;   s      -+
 	

 IIKG
 	

 7|m#&
 	




JJw
 	 ))A,C  0  
'
 	

 s9   6C)C	C).C)4:C .C)C'C)C$$C)i   )z	image/pngz
image/jpegz
image/webp)	fastapir   r   PILr   r   r   r   r    r   r
   <module>r!      s&   P
  	 !,r   