How To Transfer File To FTP Using Python

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • #Transfer #File #FTP #Python

Комментарии • 10

  • @YuliaRusalova
    @YuliaRusalova 4 месяца назад +1

    Could you show how the code looks like when i don;t have local file, but i just have directly file content (binary or base64) and his name?

  • @luvobar-dellajako3567
    @luvobar-dellajako3567 Год назад +2

    Hi, thanks for this vid. What if I have more than one directory in FTP, how to import the file to specific folder ?

  • @YuliaRusalova
    @YuliaRusalova 4 месяца назад +1

    How it will looks if i have only file content (binary or base64) and the name?

    • @MotechApp
      @MotechApp  21 день назад

      Ok I got, your assume is that you have save a file in base64 in your database right, then you want to transfer it to another server using FTP ? I think this is in two ways, read the base64 file content, write them into another file then transfer that file. In another server you would read the base64 and decode to get a file or read base64 of a file into file object then transfer it to FT server.

    • @MotechApp
      @MotechApp  21 день назад +1

      @YuliaRusailova

  • @aaroncatolico7550
    @aaroncatolico7550 Год назад +1

    It would be nice if you showed how to confirm that the file successfully uploaded or throw any errors if that happens. Do were just wrap this code in a Try and Exception as e or what?

    • @MotechApp
      @MotechApp  Год назад +1

      Yeah that perfect try: put_some_code except Exception as e: print('File failed, throw some errors',e)

  • @CAPTAIN_ABDULLATIF22
    @CAPTAIN_ABDULLATIF22 11 месяцев назад +1

    do you know speaking swahili 😮😮.?