Upload Media file to Cloud via HTTP

Hello, I am having a challenge, would like to upload media files like image or an audio file that is stored on an SD card to the cloud. Which option is recommended for this.

I am open to both http protocol and ftp protocol.

Kindly advise, Joel.

Using your PC for it!

You don't specify any requirements, hardware limitations and reasons for such limitations, so I proposed the most straight-forward option I found.

if you are using HTTP you need to specify Content-type in POST request for media for instance image/png, for audio audio/mpeg or audio/vorbis based on your files.
You need to look to RFC norm for that.

For instance i am using that for sending photos from ESP-CAM to Google Drive.

So am using arduino mega 2560 with an SD card adapter, I have an audio file on it that I wish to upload to the cloud using a SIM800l gsm module, does this help with the specifications, if so, how did you go over it.

I would like to do this using an ATMEGA based MCU like the arduino mega and the gsm module a sim800l but reading the media content from an sd card, any suggestions on how to go forward.

constructor for HTTP request is same at GSM as at Ethernet library or similar.
So I think you have enough examples to implement that for your project.

1 Like

Hey @martinius96 so, I was able to get this working but to send a 100kB file, it takes about 3 minutes using HTTP POST binary data and also the maximum I could do was to send the file in chunks of 2kB per second, any advice on how to make this transmission faster.

Tiba

Can you share your source code for review?

I did look at a similar request from another user. He did achieve a similar data rate which I confirmed with my own experiment. Looking at the raw network data there seemed to be a lot of overhead.

Here is a link to my reply with some more details.

https://forum.arduino.cc/t/improve-wifi-data-transfer-speed/871799/2

I investigated transfer speed a bit more. As a first result it looks like reversing roles (server, client) will allow a much higher transfer speed. e.g., when the Arduino is the server, it can send data much faster when it receives a GET request. That might not be possible in some or most cases.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.