Uploading files using WiFi shield

Hello! I bought a WiFi shield, and it can send text, image and mjpeg stream via http client. Is it possible to upload files (for example, txt file or mjpeg file) using the shield, and download them on other device?

Yes, you can do anything you want using sockets in python.

Thanks. Referring from “http_client.py”, I modified it to send .jpg file. But it cannot work. Is there any example that shows us how to send files by using sockets?
image

Yes, please use the urequest library: urequests — Related functions of HTTP client — MicroPython 1.22 documentation (openmv.io)

How to upload file with python requests? - Stack Overflow

1 Like