File Transfer via Sockets in Python
In this video, we learn how to transfer files via sockets in Python.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: https://www.neuralnine.com/books/
💻 The Algorithm Bible Book: https://www.neuralnine.com/books/
👕 Programming Merch: https://www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: https://www.neuralnine.com/
📷 Instagram: https://www.instagram.com/neuralnine
🐦 Twitter: https://twitter.com/neuralnine
🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/
📁 GitHub: https://github.com/NeuralNine
🎙 Discord: https://discord.gg/JU4xr8U3dm
🎵 Outro Music From: https://www.bensound.com/
by NeuralNine
linux ftp server
Thank you! I do like your inclusion of the progress bar!!
Does the image have to be in the same file directory?
please use a context manager when handling files (keyword "with")
Just had one question if anybody could answer. This method only works over local host or can work over the wifi/internet as well?
I have one little problem… When I send few back to back messages I end up with one big message that is essentially just all the messages concatenated. I don't know how to solve it and I see you somehow managed to do that. So my question is: how?
Does it work with surface? Like cv2 img?
I started the receiver in VS Code under the control of the debugger. Then I started the sender from the console. Windows 10. The receiver showed a concatenation of the file_name and file_size.
The program crashes after that.
While writing that I saw that @lastdance2099 mentioned that in his point "3)".
I did not write this as a reply to @lastdance2099 because I hope for any replies.
bro there's a loop hole
when a byte is received with ending as <END> and saved in data it'll check file_bytes which will be false and else part will execute and the end will be appended in file_byte then theres no data to receive right so it should end there but it's not and loop iterates again and client.recv tries to
recieve data which the sender has already finished sending. so it will be stuck there forever . Please correct me if i'm wrong
Curious – did you not have to strip the <END> off the received file before writing the last bit of data?
Your channel is underrated
Can this file be sent and received in any format
Hi, Did you make your website server side by python?
Thank You NeuralNine🥰
What if we want to send multiple files at the same time. How can we do that in parallel ?
Please help me out here 🙏
now, how to secure it ?
Thank you, nice explanation
Great video
hi can py socket send malware through a phone /pc after getting a wifi ip addres through nmap and a wifi password thrugh netsh wlan in python
I love your videos Florian. Because, you always explain everything very easily in a short time period 😊😊😊
very informative. Not too brief but you get the concepts behind it.
someone can helpme?
file_size=client.recv(1024).decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 6: invalid start byte
What library would you recommend for FTP transfer? Would the socket best work with FTP?
i think it's important to note why you are using os.path.getsize vs file._sizeof_ — one is size on disk, the other size in memory
how to do the same on different network?
you know what i mean