If you want to avoid the fate of the OP, then you need to send these files more than one byte per packet. If you are sending a big file, this will take relatively forever.
while (myFile.available()) {
client.write(myFile.read());
}
// close the file:
myFile.close();
This sends the data in 64 byte packets, rather than one byte per packet.
Serial.println("Writing");
byte clientBuf[64];
int clientCount = 0;
while(fh.available())
{
clientBuf[clientCount] = fh.read();
clientCount++;
if(clientCount > 63)
{
Serial.println("Packet");
client.write(clientBuf,64);
clientCount = 0;
}
}
if(clientCount > 0) client.write(clientBuf,clientCount);
edit: If you want it to work really fast, remove or comment out the Serial.println("Packet") statement. That was just for debugging.