+
    i                     $   ^ RI HtHtHtHtHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIt^ RIt^ RIt^ RIt^RIHt ]! R]4      t]P+                  R4      R	 R
 l4       t]P+                  R4      R R l4       t]P+                  R4      R R l4       tR# )    )Flaskrequestjsonify	send_fileafter_this_request	Blueprint)CORS)FTPUtils)PathN)Ftp_ServiceFTPz/getPathFormat/<int:id_format>c                $    V ^8  d   QhR\         /#    	id_formatint)formats   "_C:\Users\victor.barrera\Documents\proyectos\elepV3\Elep\src\App\api\controller\FtpController.py__annotate__r      s     P P# P    c                     \         P                   P                  V 4      pV'       d   \        R RRV/4      # \        R RRR/4      R3# )successTpathFmessageFormato no encontrado  )r   get_path_By_idr   )r   r   s   & r   api_get_path_formatr      sI    ""11)<D	4677Iui1HIJCOOr   zdownload/<int:id_format>c                $    V ^8  d   QhR\         /# r   r   )r   s   "r   r   r      s     ` ` `r   c                 R  a \         P                   P                  V 4      pV'       g   \        R RRR/4      R3# \        V4      P                  ;'       g    Rp\
        P                  ! VR7      w  po\        P                  ! V4       \        P                  ! VS4      pVP                  R 4      '       gb   \        P                  ! \        4      ;_uu_ 4        \        P                  ! S4       RRR4       \        R RRVP                  R4      /4      R3# \        VP                  R	\        V4      P                   4      4      P                   p\"        P$                  ! V4      ^ ,          ;'       g    R
p\&        V3R l4       p\)        SVRV^ R7      #   + '       g   i     L; i)r   Fr   r   r   z.bin)suffixNi  remote_relativezapplication/octet-streamc                    < \         P                  ! \        4      ;_uu_ 4        \        P                  ! S4       R R R 4       V #   + '       g   i     T # ; i)N)
contextlibsuppress	Exceptionosremove)resptmps   &r   _cleanup#api_file_download.<locals>._cleanup(   s7      ++IIcN , ,+s   AA	T)mimetypeas_attachmentdownload_namemax_age)r   r   r   r   r"   tempfilemkstempr(   closer
   download_filegetr%   r&   r'   r)   name	mimetypes
guess_typer   r   )	r   r   r"   fdresfilenamemimer,   r+   s	   &       @r   api_file_downloadr>      sF   ""11)<D	5)5LMNPSSS$Z((&Ff-GBHHRL

 
 s
+C779  ++IIcN ,	5)SWWY5GHI3NNCGG-tDz?@EEH)!,JJ0JD  
 S4t8]^__ ,+s   FF&	z/isExist/<int:id_format>c                $    V ^8  d   QhR\         /# r   r   )r   s   "r   r   r   2   s     F Fc Fr   c                     \         P                   P                  V 4      pV'       g   \        R RRR/4      R3# \        P                  ! V4      p\        R RRVRV/4      # )r   Fr   zFalta ?path=i  Texistsr   )r   r   r   r
   file_exists)r   r   rA   s   &  r   api_file_existsrC   1   s\    ""11)<D	5)^DEsJJ!!$'FItXvvtDEEr   )flaskr   r   r   r   r   r   
flask_corsr	   App.Utilities_module.FTPUtilsr
   pathlibr   r8   r2   r(   r%   servicesr   __name__routerr6   r   r>   rC    r   r   <module>rL      s    S S  2  * * " 
5(	#,-P .P &'` (`8 &'F (Fr   