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.
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?
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?
Hi, thanks for this vid. What if I have more than one directory in FTP, how to import the file to specific folder ?
How it will looks if i have only file content (binary or base64) and the name?
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.
@YuliaRusailova
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?
Yeah that perfect try: put_some_code except Exception as e: print('File failed, throw some errors',e)
do you know speaking swahili 😮😮.?
Yeah sure ... You understand ?
yeah swahili is my language