Transfer txt file from SD card to cloud

There are several options that I can think of...

  • First one that comes to mind is an FTP transfer. FTP is will known and easy to use. The downside is security (or lack there of). I believe there is an FTP library floating around. I do not know if you can do SFTP because of the encryption keys. You could trigger the FTP send by using a pub/sub event.

  • You could do a direct TCP connection to a server in order to transfer the file. The server will have to be running some sort of service that listens for the data and stores it upon receipt. The service is up to you to code or source.

  • You could post your data to an HTTP endpoint using the HTTPClient library. Depending on the size of the file, you will have to chunk the data up and send in multiple posts. You will need some sort of server with HTTP service/app running on it.

  • Use a webhook to get your data to a 3rd party storage service such as Google Iot or Azure. Again, I think you have to chunk up your data and send in multiple posts/packets which you have to reassemble on the 3rd party site.

Several other topics that you can research: