getting large file from arduino with ethernet

Hello,

I’ve build a datalogger with mega2560 and ethernetshield/sd card.

It logs a file 1 MB large. When I get them from a browser from my pc from the arduino, it sends about 80 MB.
I send the data char based.

code:
void readDataCmd(WebServer &server, WebServer::ConnectionType type, char url_tail, bool tail_complete)
{
server.httpSuccess();
device(“SD”);
snprintf(msg,sizeof msg, “Reading file … %s for http readdata request”,data_file); writeLog(msg);
if ( !(file.open(&root, data_file, O_READ))) { snprintf(msg,sizeof msg, "error reading config file "); writeError(msg);}
int16_t n; uint8_t buf[100];// nothing special about 7, just a lucky number.
while ((n = file.read(buf, sizeof(buf))) > 0)
{
device(“Ethernet”);
for (uint8_t i = 0; i < n; i++) server.print(buf
);*

  • device(“SD”);*
  • } *
  • file.close(); //Close the file*
  • snprintf(msg,sizeof msg,"Closing config file … "); writeLog(msg);*
    }
    Does anyone know a good solution to get files (till 10MB) from the arduino over ethernet to the pc in a quick way (other then char per char) ?
    Thanks,
    Jeroen.

Character by character is not only the best way, it's the only way, to send the data.